File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Sync Default Branch
2
+ on :
3
+ push : { branches: main }
4
+ workflow_dispatch :
5
+ permissions : {}
6
+
7
+ jobs :
8
+ sync-default-branch :
9
+ if : github.ref_name == github.event.repository.default_branch
10
+ permissions : {contents: write}
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
14
+ with : {egress-policy: audit}
15
+ - uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
16
+ - run : git push --force origin HEAD:refs/heads/master
17
+
18
+ # One-time commands for users to switch-over:
19
+ #
20
+ # ```console
21
+ # git branch -m master main
22
+ # git fetch origin
23
+ # git branch -u origin/main main
24
+ # git remote set-head origin -a
25
+ # ```
You can’t perform that action at this time.
0 commit comments