File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release Automerge
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 9 * * 1'
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ merge :
14+ name : Merge Release PR
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Find and merge autorelease PR
18+ env :
19+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20+ REPO : ${{ github.repository }}
21+ run : |
22+ PR=$(gh pr list --repo "$REPO" --label "autorelease: pending" --state open --json number,url --jq '.[0]')
23+ if [ -z "$PR" ] || [ "$PR" = "null" ]; then
24+ echo "No autorelease PR found, nothing to do."
25+ exit 0
26+ fi
27+ PR_NUMBER=$(echo "$PR" | jq -r '.number')
28+ PR_URL=$(echo "$PR" | jq -r '.url')
29+ echo "Merging PR #$PR_NUMBER: $PR_URL"
30+ gh pr merge "$PR_NUMBER" --repo "$REPO" --merge
You can’t perform that action at this time.
0 commit comments