diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 0000000..46bddc3 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,21 @@ +name: Steward Auto Merge +on: + pull_request: + branches: + - main +permissions: + pull-requests: write + contents: write +jobs: + auto-merge: + runs-on: ubuntu-latest + if: + ${{ startsWith(github.head_ref, 'auto/') && github.actor == 'github-actions[bot]' }} + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Approve PR + run: gh pr review "$PR_URL" --approve + - name: Enable auto-merge for Steward PRs + run: gh pr merge --merge --auto "$PR_URL" \ No newline at end of file