From a864a918c436e4c5fb3de8a26b4791ae0ad0cd5e Mon Sep 17 00:00:00 2001 From: Megan Thomas Date: Tue, 16 Apr 2024 10:00:47 -0700 Subject: [PATCH] Auto merge main to stage (#46) --- .../workflows/auto-merge-main-to-stage.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/auto-merge-main-to-stage.yml diff --git a/.github/workflows/auto-merge-main-to-stage.yml b/.github/workflows/auto-merge-main-to-stage.yml new file mode 100644 index 0000000..178a765 --- /dev/null +++ b/.github/workflows/auto-merge-main-to-stage.yml @@ -0,0 +1,23 @@ +name: PRs to main +on: + pull_request: + branches: [main] + types: [closed] +jobs: + merge-main-to-stage: + if: github.event.pull_request.merged == true + timeout-minutes: 2 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set Git config + run: | + git config user.email "github-actions@github.com" + git config user.name "github-actions" + - name: Merge main to stage + run: | + git fetch + git checkout stage + git pull + git merge --no-ff main -m "Auto-merge main to stage" + git push