diff --git a/.github/workflows/sync-dev-with-main.yml b/.github/workflows/sync-dev-with-main.yml new file mode 100644 index 0000000..82f8076 --- /dev/null +++ b/.github/workflows/sync-dev-with-main.yml @@ -0,0 +1,25 @@ +name: Sync dev with main + +on: + pull_request: + types: [closed] + branches: [main] + +permissions: + contents: write + +jobs: + fast-forward-dev: + if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'dev' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: dev + fetch-depth: 0 + + - name: Fast-forward dev to main + run: | + git fetch origin main + git merge --ff-only origin/main + git push origin dev