diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index 4cf80f4..0000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Auto-merge - -# Reusable: call from any private repo with -# on: -# pull_request: -# types: [opened, reopened, synchronize] -# jobs: -# auto-merge: -# uses: agiletec-inc/.github/.github/workflows/auto-merge.yml@main -# secrets: inherit -# with: -# runs-on: agiletec-self-hosted-runner # omit for GitHub-hosted -# -# Prerequisites on the caller repo: -# * the `agiletec-automerge` GitHub App is installed on it, with -# Contents: write AND Pull requests: write — enabling auto-merge -# pre-authorizes a future merge, so contents:write is required too -# (a pull-requests-only token gets FORBIDDEN from the API) -# * "Allow auto-merge" is enabled in the repo settings -# -# The default GITHUB_TOKEN cannot enable auto-merge — it fails with -# "Resource not accessible by integration". A token minted from the -# purpose-built agiletec-automerge App is used instead; that App carries -# only contents + pull-requests write — no admin, no actions, no -# secrets — unlike the deploy-bumper App, kept to agile-server alone. -on: - workflow_call: - inputs: - runs-on: - description: Runner label (e.g. agiletec-self-hosted-runner or ubuntu-latest) - type: string - default: ubuntu-latest - -jobs: - enable-auto-merge: - name: auto-merge - runs-on: ${{ inputs.runs-on }} - timeout-minutes: 5 - steps: - - name: Mint app token - uses: actions/create-github-app-token@v3 - id: app-token - with: - client-id: ${{ vars.AUTOMERGE_APP_CLIENT_ID }} - private-key: ${{ secrets.AUTOMERGE_APP_PRIVATE_KEY }} - # No permission-* overrides: the agiletec-automerge App is - # already purpose-scoped to contents + pull-requests write, - # both of which enabling auto-merge needs. The token defaults - # to the calling repo only (owner/repositories unset). - - name: Enable auto-merge (merge commit) - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - PR_URL: ${{ github.event.pull_request.html_url }} - run: gh pr merge --auto --merge "$PR_URL"