Skip to content

Commit 63a276c

Browse files
hcastc00claude
andcommitted
ci: add build-hash job on ubuntu-latest for IPFS hash comments on all PRs
Separates concerns: - build-test: ipfs-dev-gateway, PR events only, verifies Docker build - build-hash: ubuntu-latest, push to non-main branches, posts IPFS hash via Pinata - release: ipfs-dev-gateway, push to main only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4c3165e commit 63a276c

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ on:
33
repository_dispatch:
44
pull_request:
55
push:
6-
branches:
7-
- "main"
8-
- "v[0-9]+.[0-9]+.[0-9]+"
96
paths-ignore:
107
- "README.md"
118

@@ -21,10 +18,25 @@ jobs:
2118
node-version: "22"
2219
- run: npx @dappnode/dappnodesdk build --provider http://10.200.200.7:5001 --timeout 1h
2320

21+
build-hash:
22+
runs-on: ubuntu-latest
23+
name: Build and post IPFS hash
24+
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version: "22"
30+
- run: npx @dappnode/dappnodesdk build github-action build --timeout 1h
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
34+
PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}
35+
2436
release:
2537
name: Release
2638
runs-on: ipfs-dev-gateway
27-
if: github.event_name == 'push' || github.event_name == 'repository_dispatch'
39+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'repository_dispatch'
2840
steps:
2941
- uses: actions/checkout@v4
3042
- uses: actions/setup-node@v4

0 commit comments

Comments
 (0)