From 75723d666ef956fe70e023524282d160ca5483bf Mon Sep 17 00:00:00 2001 From: Moritz Utcke Date: Mon, 28 Apr 2025 16:59:34 -0300 Subject: [PATCH] Update --- .../auto-merge-staging-into-main.yml | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/auto-merge-staging-into-main.yml b/.github/workflows/auto-merge-staging-into-main.yml index 06069452..03ec7c09 100644 --- a/.github/workflows/auto-merge-staging-into-main.yml +++ b/.github/workflows/auto-merge-staging-into-main.yml @@ -33,21 +33,15 @@ jobs: exit 1 fi - - name: Checkout auto-merge/staging-to-main - if: steps.check.outcome == 'success' - id: cpr + - name: Checkout staging and create branch + id: create_branch run: | - # Checkout staging branch git checkout staging - - # Create a new branch for the PR git checkout -b auto-merge/staging-to-main - - # Push the new branch to the remote git push origin auto-merge/staging-to-main - - # Create the pull request using the GitHub Action + - name: Create PR from staging → main + id: create_pr uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -59,15 +53,16 @@ jobs: This PR was created automatically by GitHub Actions. It merges the latest `staging` into `main`. draft: false - + - name: Enable auto-merge on PR - if: steps.cpr.outputs.pull-request-number != '' + if: steps.create_pr.outputs.pull-request-number != '' uses: peter-evans/enable-pull-request-automerge@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} - pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} + token: ${{ secrets.GITHUB_TOKEN }} + pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }} merge-method: merge + notify_failure: needs: merge if: failure()