ci: post IPFS hash comment as tropibot[bot] - #6
Merged
Conversation
The SDK uses whatever GITHUB_TOKEN is passed in to author the PR comment. With the default workflow token the comment is posted as `github-actions`. Switch to a tropibot App installation token (the same one used by bump-upstream, staking-release, etc.) so the comment is posted as `tropibot[bot]`, matching the rest of the build-action comments in the dappnode org. Pattern mirrors `bump-upstream.yml`: `actions/create-github-app-token@v3` mints a per-run token from `vars.TROPI_APP_ID` + `secrets.TROPI_APP_PRIVATE_KEY`. Both flow automatically to callers via `secrets: inherit` / `vars` context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The SDK uses whichever
GITHUB_TOKENis passed in to author the PR comment. With the default workflow token the comment is posted asgithub-actions. Other reusable workflows in this repo (bump-upstream, staking-release, etc.) use a tropibot App installation token so comments are posted astropibot[bot]— this aligns dappnode-build-hash with the same pattern.Approach
TROPI_APP_PRIVATE_KEYto theworkflow_callsecrets (org-level, propagated viasecrets: inherit).actions/create-github-app-token@v3step that mints a per-run token fromvars.TROPI_APP_ID+secrets.TROPI_APP_PRIVATE_KEY.GITHUB_TOKENto the build step (instead ofsecrets.GITHUB_TOKEN).Test instructions
Buildworkflow on a test PR (e.g. open a draft PR or push to a feature branch).tropibot[bot](notgithub-actions).