diff --git a/.github/workflows/sync-dev.yml b/.github/workflows/sync-dev.yml new file mode 100644 index 0000000..30c69a2 --- /dev/null +++ b/.github/workflows/sync-dev.yml @@ -0,0 +1,31 @@ +name: Sync development branch with master + +on: + push: + branches: [ master ] + +permissions: + contents: write + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Fast-forward development to master + run: | + set -euo pipefail + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git fetch origin master development + + git checkout -B development origin/development || git checkout -b development + + git merge --ff-only origin/master + + git push origin development