Skip to content

CCM-17709: Added inputs to actions to accept GH app token#66

Merged
timireland merged 1 commit into
mainfrom
feature/CCM-17709_use_gh_api_token
Jun 15, 2026
Merged

CCM-17709: Added inputs to actions to accept GH app token#66
timireland merged 1 commit into
mainfrom
feature/CCM-17709_use_gh_api_token

Conversation

@timireland

Copy link
Copy Markdown
Contributor

Description

Add optional api token input to action to ensure sufficient permissions to execute when repo is made internal:

The workflow GITHUB_TOKEN is issued for the caller repo context, and inside this composite action that is the token used by gh.

For internal repos, that token usually does not automatically grant cross-repo read of releases and workflow artifacts unless access is explicitly allowed and token scope permits it.

The api token is optional and the composite action will fall back to standard GH token if not passed.

TODO add reference to corresponding PR in internal repo,

Context

SDLC now mandates that repos should be internal/private by default.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • This PR includes code generated by a coding agent

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
@timireland timireland requested a review from a team as a code owner June 15, 2026 08:33
Copilot AI review requested due to automatic review settings June 15, 2026 08:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repo’s composite publishing actions to optionally accept a caller-supplied GitHub token (e.g., a GitHub App installation token) so that gh commands inside the actions can read releases/workflow artifacts cross-repo when the calling repository becomes internal/private.

Changes:

  • Added an optional api-token input to both composite actions.
  • Updated the GH_TOKEN environment variable to prefer inputs.api-token and fall back to github.token.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
actions/eventbridge-publish/action.yml Adds optional api-token input and uses it for GH_TOKEN when resolving/downloading the bundle.
actions/ddb-publish/action.yml Adds optional api-token input and uses it for GH_TOKEN when resolving/downloading the bundle.

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

Comment thread actions/eventbridge-publish/action.yml
Comment thread actions/ddb-publish/action.yml
@timireland timireland merged commit e7faff3 into main Jun 15, 2026
58 checks passed
@timireland timireland deleted the feature/CCM-17709_use_gh_api_token branch June 15, 2026 11:18
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.

3 participants