Skip to content

ci: post IPFS hash comment as tropibot[bot] - #6

Merged
3alpha merged 1 commit into
masterfrom
feat/dappnode-build-hash-reusable
Jul 8, 2026
Merged

ci: post IPFS hash comment as tropibot[bot]#6
3alpha merged 1 commit into
masterfrom
feat/dappnode-build-hash-reusable

Conversation

@3alpha

@3alpha 3alpha commented Jul 8, 2026

Copy link
Copy Markdown
Member

Context

The SDK uses whichever GITHUB_TOKEN is passed in to author the PR comment. With the default workflow token the comment is posted as github-actions. Other reusable workflows in this repo (bump-upstream, staking-release, etc.) use a tropibot App installation token so comments are posted as tropibot[bot] — this aligns dappnode-build-hash with the same pattern.

Approach

  • Add TROPI_APP_PRIVATE_KEY to the workflow_call secrets (org-level, propagated via secrets: inherit).
  • Add an actions/create-github-app-token@v3 step that mints a per-run token from vars.TROPI_APP_ID + secrets.TROPI_APP_PRIVATE_KEY.
  • Pass the minted token as GITHUB_TOKEN to the build step (instead of secrets.GITHUB_TOKEN).

Test instructions

  1. Trigger the Build workflow on a test PR (e.g. open a draft PR or push to a feature branch).
  2. Verify the IPFS hash comment is authored by tropibot[bot] (not github-actions).
  3. Confirm the build still pins to Pinata and the install link works.

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.
@3alpha
3alpha merged commit bdcf2c2 into master Jul 8, 2026
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