.github: automate release branch updates
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
This commit is contained in:
14
.github/workflows/versions.yaml
vendored
14
.github/workflows/versions.yaml
vendored
@@ -6,8 +6,15 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
versions:
|
versions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
branch:
|
||||||
|
- 'release-0.8'
|
||||||
|
- 'main'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ matrix.branch }}
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.16
|
||||||
@@ -17,6 +24,7 @@ jobs:
|
|||||||
# Write to temporary file to make update atomic
|
# Write to temporary file to make update atomic
|
||||||
scripts/generate-versions.sh > /tmp/versions.json
|
scripts/generate-versions.sh > /tmp/versions.json
|
||||||
mv /tmp/versions.json jsonnet/kube-prometheus/versions.json
|
mv /tmp/versions.json jsonnet/kube-prometheus/versions.json
|
||||||
|
if: ${{ matrix.branch }} == 'main'
|
||||||
- name: Update jsonnet dependencies
|
- name: Update jsonnet dependencies
|
||||||
run: |
|
run: |
|
||||||
make update
|
make update
|
||||||
@@ -30,8 +38,8 @@ jobs:
|
|||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
commit-message: "[bot] Automated version update"
|
commit-message: "[bot] [${{ matrix.branch }}] Automated version update"
|
||||||
title: "[bot] Automated version update"
|
title: "[bot] [${{ matrix.branch }}] Automated version update"
|
||||||
body: |
|
body: |
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
@@ -49,7 +57,7 @@ jobs:
|
|||||||
|
|
||||||
```
|
```
|
||||||
team-reviewers: kube-prometheus-reviewers
|
team-reviewers: kube-prometheus-reviewers
|
||||||
branch: automated-updates
|
branch: automated-updates-${{ matrix.branch }}
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
# GITHUB_TOKEN cannot be used as it won't trigger CI in a created PR
|
# GITHUB_TOKEN cannot be used as it won't trigger CI in a created PR
|
||||||
# More in https://github.com/peter-evans/create-pull-request/issues/155
|
# More in https://github.com/peter-evans/create-pull-request/issues/155
|
||||||
|
|||||||
Reference in New Issue
Block a user