ci: use dappnode-build-hash reusable workflow#73
Merged
Conversation
Splits the build-hash logic into a thin caller for the new `dappnode/workflows/.github/workflows/dappnode-build-hash.yml@master` reusable workflow. `build.yml` (new) now handles both push and workflow_dispatch; `main.yml` is reduced to the release job only. Also upgrades `actions/checkout` to v7 and Node 24 (with `actions/setup-node@v6`) for the release job. The reusable workflow auto-detects the event: on push to a non-default branch it builds, pins to Pinata, and posts a comment authored by tropibot[bot] on the PR; on push to the default branch it does a test build only. (The previous `if: github.event_name == 'push' && github.ref != 'refs/heads/main'` guard is no longer needed because the SDK already handles that case.)
The release job used a broad `on.push` (no branch filter) plus an `if:` condition that checked `github.ref == 'refs/heads/<default>'`. This worked but was verbose and easy to get wrong (tailscale had `refs/heads/main` instead of `refs/heads/master`). Simplify: filter in the trigger itself, drop the `if` condition. Same behavior, half the YAML. Also adds `workflow_dispatch` so the release can be triggered manually.
Contributor
|
Dappnode bot has built and pinned the built packages to an IPFS node, for commit: 9a3298b This is a development version and should only be installed for testing purposes.
Hash: (by dappnodebot/build-action) |
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
This repo's build pipeline (an inlined
build-hashjob inmain.yml) is now consolidated into a thin caller for the newdappnode/workflows/.github/workflows/dappnode-build-hash.yml@masterreusable workflow. This produces a properly tagged IPFS hash comment authored bytropibot[bot]on every push to a non-default branch and on every PR.Approach
.github/workflows/build.yml(new) — thin stub callingdappnode-build-hashwithsecrets: inherit. Triggers onpushandworkflow_dispatchonly (nopull_request, since thepushevent already covers the build + comment case for tropibot PRs)..github/workflows/main.yml— slimmed to the release job only. The inlinedbuild-hashjob is removed;actions/checkoutupgraded to v7;actions/setup-nodeto v6; Node 24.Test instructions
Buildworkflow runs once and posts a comment with an IPFS install link and hash tagged(by dappnodebot/build-action)and authored bytropibot[bot].Mainworkflow should run the release.