diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/staging-automerge.yaml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/staging-automerge.yaml b/.github/workflows/staging-automerge.yaml new file mode 100644 index 0000000..70aa4c4 --- /dev/null +++ b/.github/workflows/staging-automerge.yaml @@ -0,0 +1,34 @@ +name: auto-merge staging + +on: + push: + branches: ["staging"] + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + automerge: + runs-on: ubuntu-latest + + steps: + - name: create-pr + id: pr + run: | + { + echo 'PR<<EOF' + gh pr create \ + --repo ${{ github.repository }} \ + --base main \ + --head ${{ github.ref_name }} \ + --title "auto-merge: ${{ github.ref_name }} -> main" \ + --fill + echo EOF + } >> "$GITHUB_ENV" + + - name: enable auto-merge + run: gh pr merge --auto --rebase "$PR" + env: + GITHUB_TOKEN: ${{ github.token }} |
