Skip to content

Commit 7542a1b

Browse files
committed
.github: automate release branch updates
Signed-off-by: Damien Grisonnet <[email protected]>
1 parent b9c73c7 commit 7542a1b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/versions.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ on:
66
jobs:
77
versions:
88
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
branch:
12+
- 'release-0.8'
13+
- 'main'
914
steps:
1015
- uses: actions/checkout@v2
16+
with:
17+
ref: ${{ matrix.branch }}
1118
- uses: actions/setup-go@v2
1219
with:
1320
go-version: 1.16
@@ -17,6 +24,7 @@ jobs:
1724
# Write to temporary file to make update atomic
1825
scripts/generate-versions.sh > /tmp/versions.json
1926
mv /tmp/versions.json jsonnet/kube-prometheus/versions.json
27+
if: ${{ matrix.branch }} == 'main'
2028
- name: Update jsonnet dependencies
2129
run: |
2230
make update
@@ -30,8 +38,8 @@ jobs:
3038
- name: Create Pull Request
3139
uses: peter-evans/create-pull-request@v3
3240
with:
33-
commit-message: "[bot] Automated version update"
34-
title: "[bot] Automated version update"
41+
commit-message: "[bot] [${{ matrix.branch }}] Automated version update"
42+
title: "[bot] [${{ matrix.branch }}] Automated version update"
3543
body: |
3644
## Description
3745
@@ -49,7 +57,7 @@ jobs:
4957
5058
```
5159
team-reviewers: kube-prometheus-reviewers
52-
branch: automated-updates
60+
branch: automated-updates-${{ matrix.branch }}
5361
delete-branch: true
5462
# GITHUB_TOKEN cannot be used as it won't trigger CI in a created PR
5563
# More in https://github.com/peter-evans/create-pull-request/issues/155

0 commit comments

Comments
 (0)