frappe_docker/.github/workflows/auto-merge-fieldmate.yml

37 lines
928 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Auto-merge PRs from fieldmate
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
jobs:
automerge:
if: startsWith(github.head_ref, 'fieldmate-auto-release')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Enable GitHub auto-merge
env:
GH_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
PR_NUMBER: ${{ github.event.pull_request.number }}
COMMIT_TITLE: "Auto-merge fieldmate release"
COMMIT_BODY: "Triggered by fieldmate release workflow"
run: |
echo " Attempting GitHub auto-merge for PR #$PR_NUMBER"
gh pr merge "$PR_NUMBER" \
--squash \
--auto \
--delete-branch \
--body "$COMMIT_BODY" \
--subject "$COMMIT_TITLE"
echo "✅ Auto-merge enabled"