From c3971b3fd9b72cfcfb0323a12f6aaed2b02ed77f Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:49:37 +0200 Subject: [PATCH 1/5] ci: use dappnode-build-hash reusable workflow 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. --- .github/workflows/build.yml | 12 ++++++++++++ .github/workflows/main.yml | 17 ++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8061165 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,12 @@ +name: Build + +on: + workflow_dispatch: + pull_request: + push: + paths-ignore: ["README.md"] + +jobs: + build: + uses: dappnode/workflows/.github/workflows/dappnode-build-hash.yml@master + secrets: inherit diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e9b138..1ff111e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,29 +1,24 @@ name: "Main" on: repository_dispatch: - pull_request: push: branches: - "master" - "v[0-9]+.[0-9]+.[0-9]+" paths-ignore: - "README.md" + workflow_dispatch: jobs: - build-test: - runs-on: ubuntu-latest - name: Build test - if: github.event_name != 'push' - steps: - - uses: actions/checkout@v2 - - run: npx @dappnode/dappnodesdk build --skip_save - release: name: Release runs-on: ubuntu-latest - if: github.event_name == 'push' + if: github.event_name == 'push' || github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v4 + with: + node-version: "24" - name: Publish run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset env: From 2388e24d8a141e72ba9ae21e53d46580617e17f9 Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:08:39 +0200 Subject: [PATCH 2/5] ci: bump actions/setup-node to v6 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1ff111e..117e47b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: if: github.event_name == 'push' || github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v7 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: "24" - name: Publish From e1ff998fc414be8bffe35fe973848e607586fbc7 Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:52:18 +0200 Subject: [PATCH 3/5] ci: drop pull_request trigger from build.yml 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. --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8061165..f5ec9ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,6 @@ name: Build on: workflow_dispatch: - pull_request: push: paths-ignore: ["README.md"] From fc7812023a4e1c456c956b779ebdd7301bca1c01 Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Thu, 9 Jul 2026 10:44:55 +0200 Subject: [PATCH 4/5] refactor(ci): drop redundant if condition, use trigger filters 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. --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 117e47b..11528e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,6 @@ jobs: release: name: Release runs-on: ubuntu-latest - if: github.event_name == 'push' || github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v6 From fbfa7a393330161df99a3c71b9c555454bb95ff5 Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Thu, 9 Jul 2026 11:46:30 +0200 Subject: [PATCH 5/5] ci: skip build.yml on default branch pushes `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. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5ec9ab..1d472b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: Build on: workflow_dispatch: push: + branches-ignore: + - "master" paths-ignore: ["README.md"] jobs: