diff --git a/.github/workflows/create-pr-to-main.yml b/.github/workflows/create-pr-to-main.yml new file mode 100644 index 00000000..54855649 --- /dev/null +++ b/.github/workflows/create-pr-to-main.yml @@ -0,0 +1,27 @@ +name: Create PR to Main + +on: + workflow_run: + workflows: ["Pre-release E2E tests"] + branches: ["test"] + types: + - completed + +permissions: + pull-requests: write + contents: read + +jobs: + create-pr: + runs-on: ubuntu-latest + steps: + - name: Checkout main branch + uses: actions/checkout@v3 + with: + ref: 'main' + + - name: Create Pull Request + run: | + gh pr create --base production --head main --title "Merge test into main" --body "Automated PR to merge test branch into main" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}