Skip to content

Commit 991f18f

Browse files
committed
Create release PR automation
1 parent 39e2e8f commit 991f18f

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/release-pr.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Create release pull request
2+
3+
on:
4+
workflow_dispatch:
5+
version:
6+
type: string
7+
description: New version, in the form v0.4.x
8+
required: true
9+
10+
11+
12+
jobs:
13+
Update Images Manifest Files:
14+
runs-on: ubuntu-latest
15+
env:
16+
target_branch: rel/${{github.event.inputs.version}}
17+
version: ${{github.event.inputs.version}}
18+
steps:
19+
- uses: actions/checkout@v5
20+
- name: Checkout $target_branch
21+
run: git checkout -b $target_branch
22+
- name: Update manifest files
23+
run: ./build/prepare-release.sh
24+
- name: Push manifest updates
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.PAT }}
27+
run: |
28+
git add -A
29+
git commit -m "Release manifest update"
30+
git push origin $target_branch
31+
- name: Create pull request
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.PAT }}
34+
run:
35+
gh api \
36+
--method POST \
37+
-H "Accept: application/vnd.github+json" \
38+
/repos/${GITHUB_REPOSITORY}/pulls \
39+
-f title="[Monthly Release] $version" \
40+
-f body="" \
41+
-f head="$target_branch" \
42+
-f base='main'
43+
44+

0 commit comments

Comments
 (0)