Skip to content

Commit 1ae3609

Browse files
risssonBeryJu
andauthored
ci: add workflow to automatically update next branch (#5921)
* ci: add workflow to automatically update next branch Signed-off-by: Marc 'risson' Schmitt <[email protected]> * use environments, use non-deprecated GHA output Signed-off-by: Jens Langhammer <[email protected]> * set write permissions for contents Signed-off-by: Jens Langhammer <[email protected]> --------- Signed-off-by: Marc 'risson' Schmitt <[email protected]> Signed-off-by: Jens Langhammer <[email protected]> Co-authored-by: Jens Langhammer <[email protected]>
1 parent 51f4d46 commit 1ae3609

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: release-next-branch
2+
3+
on:
4+
schedule:
5+
- cron: "0 12 * * *" # every day at noon
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
update-next:
13+
runs-on: ubuntu-latest
14+
environment: internal-production
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
ref: main
19+
- id: main-status
20+
run: |
21+
status=$(curl -fsSL -o head_status.json -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token}}" "https://api.github.com/repos/${{ github.repository }}/commits/HEAD/status" | jq -r '.status')
22+
echo "status=${status}" >> $GITHUB_OUTPUT
23+
- if: ${{ steps.main-status.outputs.status == 'success' }}
24+
run: |
25+
git push origin next --force

0 commit comments

Comments
 (0)