Merge pull request #7 from funidata/trunk #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow keeps `trunk` in sync with `main` when PR's are merged. | |
name: Sync trunk with main | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
sync: | |
name: Sync trunk with main | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Git user | |
run: | | |
git config user.name "GitHub Action" | |
git config user.email "[email protected]" | |
- name: Rebase trunk on main | |
run: | | |
git checkout main | |
git fetch origin | |
git checkout trunk | |
git pull | |
git rebase origin/main | |
git push --force-with-lease origin trunk |