Skip to content

chore: update token used for approval action#161

Closed
skasti wants to merge 1 commit into
mainfrom
skasti/update-token-used-for-approval
Closed

chore: update token used for approval action#161
skasti wants to merge 1 commit into
mainfrom
skasti/update-token-used-for-approval

Conversation

@skasti

@skasti skasti commented Apr 16, 2026

Copy link
Copy Markdown

We are getting this error in our pipeline:
image

Looking at the workflow, it striked me that every other step was using the output from a step for github token, so hoping that is the reason?

This pull request makes a small change to the GitHub Actions workflow for updating the infrastructure repository. The change updates the source of the GitHub token used for the pull request approval step.

  • The github-token input for the juliangruber/approve-pull-request-action is now set to use the token generated in the generate_token step (steps.generate_token.outputs.token) instead of the previous secrets.approve-pr-token.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the GitHub Actions workflow used to create and manage infrastructure update pull requests by switching the approval step to use the GitHub App token generated earlier in the job, aligning it with the other workflow steps’ authentication approach.

Changes:

  • Switch juliangruber/approve-pull-request-action to use ${{ steps.generate_token.outputs.token }} instead of ${{ secrets.approve-pr-token }}.

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

uses: juliangruber/approve-pull-request-action@68fcc9a5a73b5641cadf757cf99d73720dcb05d0 # v2.1.0
with:
github-token: ${{ secrets.approve-pr-token }}
github-token: ${{ steps.generate_token.outputs.token }}

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

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

Now that the approval step uses steps.generate_token.outputs.token, the workflow-call secret approve-pr-token is unused (it’s only declared, not referenced). Consider removing that secret from on.workflow_call.secrets (or updating callers/docs) to avoid confusion and reduce required secret surface area.

Copilot uses AI. Check for mistakes.

@pravindahal pravindahal 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.

The intended use of this workflow is to run it on merge to main, and not on PR creation. If you have requirements where you'd want to potentially deploy builds from a branch without it being merged, let's discuss this.

@skasti

skasti commented Apr 17, 2026

Copy link
Copy Markdown
Author

The intended use of this workflow is to run it on merge to main, and not on PR creation. If you have requirements where you'd want to potentially deploy builds from a branch without it being merged, let's discuss this.

Not sure what you are getting at here. I am not trying to change when the workflow runs 😅

@skasti skasti requested a review from pravindahal April 17, 2026 07:50
@pravindahal pravindahal closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants