Skip to content

Commit 66795a2

Browse files
authored
Merge pull request #78 from bats-core/sync-main-master
Create GHA job to sync master with main
2 parents 1dfe415 + 38f74c8 commit 66795a2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
# ```

0 commit comments

Comments
 (0)