File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Auto PR to main when version changes
2+
3+ on :
4+ push :
5+ branches :
6+ - canary
7+
8+ jobs :
9+ create-pr :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout Repository
13+ uses : actions/checkout@v4
14+
15+ - name : Get current version from package.json
16+ id : package_version
17+ run : echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
18+
19+ - name : Check if a PR already exists
20+ id : check_pr
21+ run : |
22+ PR_EXISTS=$(gh pr list --state open --base main --head canary --json number --jq '. | length')
23+ echo "PR_EXISTS=$PR_EXISTS" >> $GITHUB_ENV
24+ env :
25+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26+
27+ - name : Create Pull Request
28+ if : env.PR_EXISTS == '0'
29+ uses : peter-evans/create-pull-request@v5
30+ with :
31+ title : " 🚀 Release v${{ env.VERSION }}"
32+ body : |
33+ ## 🔄 Release v${{ env.VERSION }}
34+
35+ This PR promotes changes from `canary` to `main` for version v${{ env.VERSION }}.
36+
37+ ### 🔍 Changes Include:
38+ - Version bump to v${{ env.VERSION }}
39+ - All changes from canary branch
40+
41+ ### ✅ Pre-merge Checklist:
42+ - [ ] All tests passing
43+ - [ ] Documentation updated
44+ - [ ] Docker images built and tested
45+
46+ > 🤖 This PR was automatically generated from the canary branch
47+ base : main
48+ branch : canary
49+ labels : " release"
50+ reviewers : " siumauricio"
51+ assignees : " siumauricio"
52+ env :
53+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments