File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Periodically sync branches
3+ on :
4+ schedule :
5+ - cron : ' 0 21 * * 1'
6+
7+ jobs :
8+ trigger_sync :
9+ uses : openstack-k8s-operators/ci-framework/.github/workflows/sync_branches_reusable_workflow.yml@main
10+ with :
11+ main-branch : main
12+ follower-branch : ananya-do-not-use-tmp
Original file line number Diff line number Diff line change 1+ ---
2+ name : Sync a follower branch with Main
3+ on :
4+ workflow_call :
5+ inputs :
6+ main-branch :
7+ required : true
8+ type : string
9+ follower-branch :
10+ required : true
11+ type : string
12+
13+ jobs :
14+ sync :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : write
18+ pull-requests : write
19+ steps :
20+ - name : Checkout main branch
21+ uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 0
24+ ref :
25+ ${{ inputs.main-branch }}
26+
27+ - name : Checkout, rebase and push to follower branch
28+ uses : actions/checkout@v4
29+ with :
30+ fetch-depth : 0
31+ ref :
32+ ${{ inputs.follower-branch }}
33+ - run : |
34+ # Details about the GH action bot comes from
35+ # https://api.github.com/users/github-actions%5Bbot%5D
36+ git config user.name "github-actions[bot]"
37+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+ git rebase origin/${{ inputs.main-branch }}
39+ git push origin ${{ inputs.follower-branch }}
You can’t perform that action at this time.
0 commit comments