Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/sync-default-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Sync Default Branch
on:
push: { branches: main }
workflow_dispatch:
permissions: {}

jobs:
sync-default-branch:
if: github.ref_name == github.event.repository.default_branch
permissions: {contents: write}
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with: {egress-policy: audit}
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- run: git push --force origin HEAD:refs/heads/master

# One-time commands for users to switch-over:
#
# ```console
# git branch -m master main
# git fetch origin
# git branch -u origin/main main
# git remote set-head origin -a
# ```