GitStream #78162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitStream | |
concurrency: gitstream | |
on: | |
schedule: | |
- cron: '*/10 * * * *' | |
jobs: | |
gitstream: | |
name: Run GitStream | |
runs-on: ubuntu-latest | |
env: | |
GO_RELEASE: go1.20.11.linux-amd64.tar.gz | |
container: | |
image: quay.io/edge-infrastructure/gitstream:latest | |
permissions: | |
actions: write | |
contents: write | |
issues: write | |
pull-requests: write | |
steps: | |
# gcompat: glibc compatibility layer on alpine for Go | |
# git: to check out the repos | |
# tar: to save and restore /usr/local/go to / from the GitHub cache (need GNU) | |
- name: Install dependencies | |
run: apk add gcompat git tar | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout the downstream repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
path: _gitstream_downstream | |
- name: Cache the Go archive | |
id: cache-go | |
uses: actions/cache@v3 | |
with: | |
path: /usr/local/go | |
key: ${{ env.GO_RELEASE }} | |
- name: Download and install Go | |
run: | | |
rm -rf /usr/local/go | |
wget -O- https://go.dev/dl/${GO_RELEASE} | tar -C /usr/local -xz | |
if: steps.cache-go.outputs.cache-hit != 'true' | |
- name: Add Go to PATH | |
run: echo "PATH=/usr/local/go/bin:${PATH}" >> $GITHUB_ENV | |
- name: Bring upstream commits | |
run: gitstream sync | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Make the oldest draft PR ready for review | |
run: gitstream make-oldest-draft-pr-ready | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Assign PRs and issues to the upstream commit author | |
run: gitstream assign | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |