Skip to content

ci: use dappnode-build-hash reusable workflow#160

Merged
3alpha merged 5 commits into
masterfrom
refactor/use-dappnode-build-hash
Jul 9, 2026
Merged

ci: use dappnode-build-hash reusable workflow#160
3alpha merged 5 commits into
masterfrom
refactor/use-dappnode-build-hash

Conversation

@3alpha

@3alpha 3alpha commented Jul 8, 2026

Copy link
Copy Markdown
Member

Context

This repo's build pipeline (either an inlined build-test step with --skip_save or an inlined npx dappnodesdk github-action build call) is now consolidated into a thin caller for the new dappnode/workflows/.github/workflows/dappnode-build-hash.yml@master reusable workflow. This produces a properly tagged IPFS hash comment on every push to a non-default branch and on every PR.

Approach

  • .github/workflows/build.yml — thin stub calling dappnode-build-hash with secrets: inherit.
  • .github/workflows/main.yml — slimmed to the release job only. build-test removed; actions/checkout upgraded to v7; Node 24 added.
  • The pull_request trigger is moved from main.yml to build.yml (the new reusable workflow handles both events).

Test instructions

  1. Open a test PR or push to a feature branch.
  2. Verify the Build workflow runs and posts a comment with an IPFS install link and hash tagged (by dappnodebot/build-action).
  3. After merge to the default branch, the Main workflow should run the release.

Replaces the inlined build step (which used `--skip_save` and never
posted an IPFS hash on PRs) with a thin caller for the new
`dappnode/workflows/.github/workflows/dappnode-build-hash.yml@master`
reusable workflow. `build.yml` now handles both push and PR events;
`main.yml` is reduced to the release job only.

Also upgrades `actions/checkout` to v7 and adds Node 24 setup for the
release job.
@3alpha 3alpha requested a review from a team as a code owner July 8, 2026 14:50
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Dappnode bot has built and pinned the built packages to an IPFS node, for commit: fbfa7a3

This is a development version and should only be installed for testing purposes.

  1. Package ipfs.dnp.dappnode.eth

Install link

Hash: /ipfs/QmdXAXp27xZDiehyVxCWoCATqgWLaJHW27nz3u82E7rg54

(by dappnodebot/build-action)

3alpha added 2 commits July 8, 2026 17:08
The `push` event already fires when tropibot pushes commits to the
feature branch, so the build, IPFS pin, and PR comment all happen
once per commit. The `pull_request` event was firing the same
workflow a second time as a no-op (--skip_save test build).

The reusable workflow SDK auto-detects the event: `push` to a
non-default branch builds + pins + comments, `push` to default does
a test build, and (now unused) `pull_request` would do a test build.
@3alpha 3alpha self-assigned this Jul 8, 2026
3alpha added 2 commits July 9, 2026 10:44
The release job had a broad `on.push` (no branch filter) plus an
`if:` condition that checked `github.event_name`. This was
redundant: the trigger already filters by branch (or by event type
for repository_dispatch / workflow_dispatch), and the if condition
just re-checked the event type.

Simplify: keep the trigger filters, drop the if. Also ensure
`repository_dispatch` is in the trigger list for repos that
referenced it in their if condition.
`build.yml` triggers on `push` and `workflow_dispatch`. The reusable
`dappnode-build-hash.yml` SDK already auto-detects pushes to the default
branch and runs a no-op test build (no IPFS pin, no comment), so the
workflow run is wasted CI on every merge.

Add `branches-ignore: ["master"]` to the push trigger so the workflow
doesn't even start on default-branch pushes. `workflow_dispatch` and
pushes to other branches (e.g. tropibot bump branches) still trigger it
as before.
@3alpha 3alpha merged commit 2bbcdd7 into master Jul 9, 2026
1 check passed
@3alpha 3alpha deleted the refactor/use-dappnode-build-hash branch July 9, 2026 11:34
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