-
Notifications
You must be signed in to change notification settings - Fork 14
72 lines (58 loc) · 1.81 KB
/
gitstream.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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 }}