Skip to content

Add optional github-token secret to auto-merge workflow#15

Open
endrju19 wants to merge 1 commit intomainfrom
extend-secrets
Open

Add optional github-token secret to auto-merge workflow#15
endrju19 wants to merge 1 commit intomainfrom
extend-secrets

Conversation

@endrju19
Copy link

Merges done with GITHUB_TOKEN don't trigger subsequent workflows
(GitHub's anti-recursion policy), which prevents deploy jobs from
running after auto-merged PRs. Adding an optional PAT input allows
repos to opt in to triggering downstream workflows.

Backwards-compatible: defaults to GITHUB_TOKEN when not provided.

  Merges done with GITHUB_TOKEN don't trigger subsequent workflows
  (GitHub's anti-recursion policy), which prevents deploy jobs from
  running after auto-merged PRs. Adding an optional PAT input allows
  repos to opt in to triggering downstream workflows.

  Backwards-compatible: defaults to GITHUB_TOKEN when not provided.
@endrju19 endrju19 requested a review from Copilot February 12, 2026 12:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional token secret to the reusable auto-merge workflow so merges can be performed with a PAT (to allow downstream workflows like deploy to run), while keeping the default behavior using GITHUB_TOKEN.

Changes:

  • Introduces an optional workflow_call secret (github-token) with documentation.
  • Switches the action’s GITHUB_TOKEN env to prefer the optional secret, falling back to secrets.GITHUB_TOKEN.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant