From 1f2cdb59a88d26aeecd0b80285dd6df0fe619e4c Mon Sep 17 00:00:00 2001 From: 3alpha <15694175+3alpha@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:28:21 +0200 Subject: [PATCH] ci: use dappnode-build-hash reusable workflow Replaces the inlined build-test (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` (new) 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. - Drops the redundant `if:` condition on the release job (the `on.push.branches` filter already restricts to master/v*). - Adds `repository_dispatch` to the `on:` triggers. - Adds `branches-ignore: ["master"]` to `build.yml`'s push trigger so the workflow doesn't run on default-branch pushes (the SDK already auto-detects and does a no-op test build in that case). 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. `workflow_dispatch` and `repository_dispatch` only fire the release job (no `build.yml` trigger). --- .github/workflows/build.yml | 13 +++++++++++++ .github/workflows/main.yml | 17 ++++++----------- 2 files changed, 19 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..1d472b8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,13 @@ +name: Build + +on: + workflow_dispatch: + push: + branches-ignore: + - "master" + 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 c784489..18329f7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,5 @@ name: "Main" on: - pull_request: push: branches: - "master" @@ -8,22 +7,18 @@ on: - "v[0-9]+.[0-9]+.[0-9]+.[0-9]+" paths-ignore: - "README.md" + workflow_dispatch: + repository_dispatch: jobs: - build-test: - runs-on: ubuntu-latest - name: Build test - if: github.event_name != 'push' - steps: - - uses: actions/checkout@v4 - - run: npx @dappnode/dappnodesdk build --skip_save - release: name: Release runs-on: ubuntu-latest - if: github.event_name == 'push' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v6 + with: + node-version: "24" - name: Publish run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset env: