From dee28aa23dabfea27fa056e52444e4d036ee27b8 Mon Sep 17 00:00:00 2001 From: pablomendezroyo Date: Thu, 5 Feb 2026 08:19:32 +0100 Subject: [PATCH 1/3] refactor: remove obsolete workflows and add new sync and release workflows --- .github/workflows/build.yml | 18 --------- .github/workflows/main.yml | 44 --------------------- .github/workflows/releae.yml | 59 ++++++++++++++++++++++++++++ .github/workflows/snapshot_check.yml | 20 ---------- .github/workflows/sync-test.yml | 46 ++++++++++++++++++++++ .github/workflows/sync.yml | 26 ++++++++++++ 6 files changed, 131 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/releae.yml delete mode 100644 .github/workflows/snapshot_check.yml create mode 100644 .github/workflows/sync-test.yml create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index dcd8e24..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build test -on: - push: - pull_request: - -jobs: - build: - runs-on: ipfs-dev-gateway - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '22' - - run: npx @dappnode/dappnodesdk github-action build --skip-save --variant mainnet --content_provider=http://10.200.200.7:5001 --eth_provider=https://web3.dappnode.net - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }} - PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index b7ad177..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: "Main" -on: - pull_request: - push: - branches: - - "main" - - "master" - - "v[0-9]+.[0-9]+.[0-9]+" - paths-ignore: - - "README.md" - -jobs: - build-test: - runs-on: ipfs-dev-gateway - name: Build test - if: github.event_name != 'push' - steps: - - name: Checkout - uses: actions/checkout@v4 - - run: npx @dappnode/dappnodesdk github-action build --skip-save --variant mainnet - - # e2e-test: - # runs-on: mainnet - # needs: build-test - # if: github.event_name != 'push' - # name: End to end tests - # steps: - # - uses: actions/checkout@v4 - # - run: npx @dappnode/dappnodesdk@latest github-action test-end-to-end --errorLogsTimeout 120 --healthCheckUrl http://erigon.dappnode:8545 --network mainnet - - release: - name: Release - runs-on: ipfs-dev-gateway - if: github.event_name == 'push' || github.event_name == 'repository_dispatch' - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '22' - - name: Publish - run: npx @dappnode/dappnodesdk publish patch --github_release --timeout 1h --all-variants --content_provider=http://10.200.200.7:5001 --eth_provider=https://web3.dappnode.net - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" diff --git a/.github/workflows/releae.yml b/.github/workflows/releae.yml new file mode 100644 index 0000000..bee010e --- /dev/null +++ b/.github/workflows/releae.yml @@ -0,0 +1,59 @@ +name: "Release" +on: + workflow_dispatch: + inputs: + consensus_client: + description: "Consensus Client" + required: true + type: choice + options: [lodestar, teku, prysm, nimbus, lighthouse] + push: + branches: + - "main" + paths-ignore: + - "README.md" + +jobs: + build: + runs-on: staking-test-hoodi + name: Build + outputs: + ipfs_hash: ${{ steps.extract_hash.outputs.ipfs_hash }} + steps: + - uses: actions/checkout@v6 + - name: Build and upload + run: npx @dappnode/dappnodesdk build --provider=http://$(docker inspect DAppNodeCore-ipfs.dnp.dappnode.eth --format '{{.NetworkSettings.Networks.dncore_network.IPAddress}}'):5001 --variant=hoodi + - name: Extract IPFS hash from releases.json + id: extract_hash + run: | + # Get the last key's hash from releases.json + IPFS_HASH=$(jq -r 'to_entries | last | .value.hash' package_variants/hoodi/releases.json) + echo "ipfs_hash=$IPFS_HASH" >> $GITHUB_OUTPUT + echo "Extracted IPFS hash: $IPFS_HASH" + + test: + name: Test + runs-on: staking-test-hoodi + needs: [build] + steps: + - uses: actions/checkout@v6 + - name: Run staker test runner + run: | + docker run --rm --pull=always \ + --network dncore_network -e CONSENSUS_CLIENT=${{ github.event.inputs.consensus_client }} \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -e MODE=test -e IPFS_HASH=${{ needs.build.outputs.ipfs_hash }} \ + -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} -e GITHUB_REPOSITORY=${{ github.repository }} -e GITHUB_PR_NUMBER=${{ github.event.pull_request.number }} -e GITHUB_RUN_ID=${{ github.run_id }} -e GITHUB_SERVER_URL=${{ github.server_url }} \ + ghcr.io/dappnode/staker-test-util/test-runner:latest + + release: + name: Release + runs-on: ubuntu-latest + needs: [test] + steps: + - uses: actions/checkout@v6 + - name: Publish + run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset --timeout 2h --all-variants + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" diff --git a/.github/workflows/snapshot_check.yml b/.github/workflows/snapshot_check.yml deleted file mode 100644 index eb6a734..0000000 --- a/.github/workflows/snapshot_check.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Snapshot Checker - -on: - schedule: - - cron: '0 */6 * * *' - workflow_dispatch: - -jobs: - snapshot-check-docker: - runs-on: staking-test-hoodi - steps: - - name: Run Snapshot Checker (Docker) - run: | - docker run --rm --pull=always \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v /var/lib/docker/volumes:/var/lib/docker/volumes \ - -e EXECUTION_CLIENT='erigon' \ - -e NETWORK=hoodi \ - -e LOG_LEVEL=debug \ - ghcr.io/dappnode/staker-test-util/snapshot-checker:latest diff --git a/.github/workflows/sync-test.yml b/.github/workflows/sync-test.yml new file mode 100644 index 0000000..3ad2ec6 --- /dev/null +++ b/.github/workflows/sync-test.yml @@ -0,0 +1,46 @@ +name: Execution Client Sync Test + +on: + workflow_dispatch: + inputs: + consensus_client: + description: "Consensus Client" + required: true + type: choice + options: [lodestar, teku, prysm, nimbus, lighthouse] + pull_request: + branches: + - "main" + paths-ignore: + - "README.md" + +jobs: + build: + runs-on: staking-test-hoodi + name: Build + outputs: + ipfs_hash: ${{ steps.extract_hash.outputs.ipfs_hash }} + steps: + - uses: actions/checkout@v6 + - name: Build and upload + run: npx @dappnode/dappnodesdk build --provider=http://$(docker inspect DAppNodeCore-ipfs.dnp.dappnode.eth --format '{{.NetworkSettings.Networks.dncore_network.IPAddress}}'):5001 --variant=hoodi + - name: Extract IPFS hash from releases.json + id: extract_hash + run: | + # Get the last key's hash from releases.json + IPFS_HASH=$(jq -r 'to_entries | last | .value.hash' package_variants/hoodi/releases.json) + echo "ipfs_hash=$IPFS_HASH" >> $GITHUB_OUTPUT + echo "Extracted IPFS hash: $IPFS_HASH" + + sync-test: + runs-on: staking-test-hoodi + name: Execution Client Sync Test + needs: [build] + steps: + - name: Run sync + run: | + docker run --rm --pull=always --network dncore_network \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -e MODE=sync -e EXECUTION_CLIENT='erigon' -e IPFS_HASH=${{ needs.build.outputs.ipfs_hash }} -e CONSENSUS_CLIENT=${{ github.event.inputs.consensus_client }} \ + -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} -e GITHUB_REPOSITORY=${{ github.repository }} -e GITHUB_PR_NUMBER=${{ github.event.pull_request.number }} -e GITHUB_RUN_ID=${{ github.run_id }} -e GITHUB_SERVER_URL=${{ github.server_url }} \ + ghcr.io/dappnode/staker-test-util/test-runner:latest diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000..13cdd6e --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,26 @@ +name: Execution Client Sync Production + +on: + schedule: + - cron: "0 5 * * *" + workflow_dispatch: + inputs: + consensus_client: + description: "Consensus Client" + required: true + type: choice + options: [lodestar, teku, prysm, nimbus, lighthouse] + +jobs: + sync: + runs-on: staking-test-hoodi + steps: + - name: Run sync + run: | + docker run --rm --pull=always --network dncore_network \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -e MODE=sync \ + -e EXECUTION_CLIENT='erigon' \ + -e CONSENSUS_CLIENT=${{ github.event.inputs.consensus_client }} \ + -e NETWORK=hoodi \ + ghcr.io/dappnode/staker-test-util/test-runner:latest From 48e0547a88e166300614327fd3e77b1bd11d4580 Mon Sep 17 00:00:00 2001 From: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:14:54 +0100 Subject: [PATCH 2/3] Use ipfs-dev-gateway --- .github/workflows/releae.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/releae.yml b/.github/workflows/releae.yml index bee010e..6e4f494 100644 --- a/.github/workflows/releae.yml +++ b/.github/workflows/releae.yml @@ -48,12 +48,12 @@ jobs: release: name: Release - runs-on: ubuntu-latest + runs-on: ipfs-dev-gateway needs: [test] steps: - uses: actions/checkout@v6 - name: Publish - run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset --timeout 2h --all-variants + run: npx @dappnode/dappnodesdk publish patch --content_provider=http://10.200.200.7:5001 --eth_provider=https://web3.dappnode.net --timeout 2h --all-variants env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" From d09965e8b6aa0bbfddb19b73cfc8bd7e1fb57ab0 Mon Sep 17 00:00:00 2001 From: pablomendezroyo <41727368+pablomendezroyo@users.noreply.github.com> Date: Thu, 5 Feb 2026 20:54:39 +0100 Subject: [PATCH 3/3] add setup node --- .github/workflows/releae.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/releae.yml b/.github/workflows/releae.yml index 6e4f494..ae6c2a1 100644 --- a/.github/workflows/releae.yml +++ b/.github/workflows/releae.yml @@ -52,6 +52,9 @@ jobs: needs: [test] steps: - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: "22" - name: Publish run: npx @dappnode/dappnodesdk publish patch --content_provider=http://10.200.200.7:5001 --eth_provider=https://web3.dappnode.net --timeout 2h --all-variants env: