File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Automated Merges
2+
3+ on :
4+ schedule :
5+ # Runs every day at 00:00 UTC
6+ - cron : " 0 0 * * *"
7+ workflow_dispatch :
8+
9+ jobs :
10+ # Job 1: Merge dev -> release/nightly (run daily except Friday)
11+ dev-to-nightly :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Check the weekday
15+ id : check-day
16+ run : |
17+ # +%u returns a number for day of week: Monday=1 ... Sunday=7
18+ DAY_OF_WEEK=$(date +'%u')
19+ echo "day_of_week=$DAY_OF_WEEK" >> $GITHUB_OUTPUT
20+
21+ - name : Create and merge PR from dev to release/nightly
22+ if : ${{ steps.check-day.outputs.day_of_week != '5' }}
23+ uses : peter-evans/create-pull-request@v3
24+ with :
25+ token : ${{ secrets.GITHUB_TOKEN }}
26+ base : release/nightly
27+ head : dev
28+ title : " Nightly Merge: dev → release/nightly"
29+ body : " This PR was automatically created and merged by GitHub Actions."
30+ branch : " auto/dev-to-nightly"
31+ merge : true
32+ merge_method : squash
33+
34+ # Job 2: Merge release/nightly -> release/beta (run only on Friday)
35+ nightly-to-beta :
36+ runs-on : ubuntu-latest
37+ needs : [dev-to-nightly]
38+ steps :
39+ - name : Check the weekday
40+ id : check-day
41+ run : |
42+ DAY_OF_WEEK=$(date +'%u')
43+ echo "day_of_week=$DAY_OF_WEEK" >> $GITHUB_OUTPUT
44+
45+ - name : Create and merge PR from release/nightly to release/beta
46+ if : ${{ steps.check-day.outputs.day_of_week == '5' }}
47+ uses : peter-evans/create-pull-request@v3
48+ with :
49+ token : ${{ secrets.GITHUB_TOKEN }}
50+ base : release/beta
51+ head : release/nightly
52+ title : " Weekly Merge: release/nightly → release/beta"
53+ body : " This PR was automatically created and merged by GitHub Actions."
54+ branch : " auto/nightly-to-beta"
55+ merge : true
56+ merge_method : squash
You can’t perform that action at this time.
0 commit comments