Skip to content

Commit 0b805fb

Browse files
authored
Merge pull request #73 from dappnode/refactor/use-dappnode-build-hash
ci: use dappnode-build-hash reusable workflow
2 parents 3cc1523 + 9a3298b commit 0b805fb

2 files changed

Lines changed: 17 additions & 19 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths-ignore: ["README.md"]
7+
8+
jobs:
9+
build:
10+
uses: dappnode/workflows/.github/workflows/dappnode-build-hash.yml@master
11+
secrets: inherit

‎.github/workflows/main.yml‎

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,22 @@
11
name: "Main"
22
on:
3-
repository_dispatch:
43
push:
4+
branches:
5+
- "main"
56
paths-ignore:
67
- "README.md"
8+
repository_dispatch:
9+
workflow_dispatch:
710

811
jobs:
9-
build-hash:
10-
runs-on: ubuntu-latest
11-
name: Build and post IPFS hash
12-
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
13-
steps:
14-
- uses: actions/checkout@v6
15-
- uses: actions/setup-node@v6
16-
with:
17-
node-version: "22"
18-
- run: npx @dappnode/dappnodesdk github-action build
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
22-
PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}
23-
2412
release:
2513
name: Release
2614
runs-on: ipfs-dev-gateway
27-
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'repository_dispatch'
2815
steps:
29-
- uses: actions/checkout@v6
16+
- uses: actions/checkout@v7
3017
- uses: actions/setup-node@v6
3118
with:
32-
node-version: "22"
19+
node-version: "24"
3320
- name: Log in to GitHub Container Registry
3421
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
3522
- name: Publish

0 commit comments

Comments
 (0)