diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml deleted file mode 100644 index 1e6ada0..0000000 --- a/.github/workflows/auto_check.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Bump upstream version - -on: - schedule: - - cron: "00 */4 * * *" - workflow_dispatch: - push: - branches: - - "master" - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ vars.TROPI_APP_ID }} - private-key: ${{ secrets.TROPI_APP_PRIVATE_KEY }} - - run: npx @dappnode/dappnodesdk github-action bump-upstream --use-variants - env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }} - PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }} diff --git a/.github/workflows/bump-upstream.yml b/.github/workflows/bump-upstream.yml new file mode 100644 index 0000000..713f028 --- /dev/null +++ b/.github/workflows/bump-upstream.yml @@ -0,0 +1,14 @@ +name: Bump upstream version + +on: + schedule: + - cron: "00 */4 * * *" + workflow_dispatch: + push: + branches: + - "master" + +jobs: + bump-upstream: + uses: dappnode/workflows/.github/workflows/bump-upstream.yml@master + secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1194007..05f0046 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,5 @@ -name: "Release" +name: Release + on: workflow_dispatch: inputs: @@ -14,59 +15,9 @@ on: - "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 - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ vars.TROPI_APP_ID }} - private-key: ${{ secrets.TROPI_APP_PRIVATE_KEY }} - - 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=${{ steps.app-token.outputs.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: ipfs-dev-gateway - needs: [test] - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 - with: - node-version: "22" - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ vars.TROPI_APP_ID }} - private-key: ${{ secrets.TROPI_APP_PRIVATE_KEY }} - - name: Publish - run: npx @dappnode/dappnodesdk publish patch --github-release --content_provider=http://10.200.200.7:5001 --eth_provider=https://web3.dappnode.net --timeout 2h --all-variants - env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" + uses: dappnode/workflows/.github/workflows/staking-release.yml@master + with: + package_variant: "hoodi" + consensus_client: ${{ inputs.consensus_client || '' }} + secrets: inherit diff --git a/.github/workflows/sync-production.yml b/.github/workflows/sync-production.yml new file mode 100644 index 0000000..df28d8d --- /dev/null +++ b/.github/workflows/sync-production.yml @@ -0,0 +1,20 @@ +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: + uses: dappnode/workflows/.github/workflows/sync-production.yml@master + with: + execution_client: "reth" + consensus_client: ${{ inputs.consensus_client || '' }} + secrets: inherit diff --git a/.github/workflows/sync-test.yml b/.github/workflows/sync-test.yml index c83e9a9..b703119 100644 --- a/.github/workflows/sync-test.yml +++ b/.github/workflows/sync-test.yml @@ -1,51 +1,23 @@ 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" + 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: - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ vars.TROPI_APP_ID }} - private-key: ${{ secrets.TROPI_APP_PRIVATE_KEY }} - - 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='reth' -e IPFS_HASH=${{ needs.build.outputs.ipfs_hash }} -e CONSENSUS_CLIENT=${{ github.event.inputs.consensus_client }} \ - -e GITHUB_TOKEN=${{ steps.app-token.outputs.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 + sync-test: + uses: dappnode/workflows/.github/workflows/staking-sync-test.yml@master + with: + execution_client: "reth" + consensus_client: ${{ inputs.consensus_client || '' }} + secrets: inherit diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml deleted file mode 100644 index d2117ac..0000000 --- a/.github/workflows/sync.yml +++ /dev/null @@ -1,34 +0,0 @@ -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='reth' \ - -e CONSENSUS_CLIENT=${{ github.event.inputs.consensus_client }} \ - -e NETWORK=hoodi \ - ghcr.io/dappnode/staker-test-util/test-runner:latest - notify: - needs: sync - if: always() && needs.sync.result != 'skipped' - uses: dappnode/staker-test-util/.github/workflows/notify-discord.yml@main - with: - result: ${{ needs.sync.result }} - test_type: "sync" - secrets: inherit diff --git a/package_variants/hoodi/releases.json b/package_variants/hoodi/releases.json new file mode 100644 index 0000000..dc1e084 --- /dev/null +++ b/package_variants/hoodi/releases.json @@ -0,0 +1,8 @@ +{ + "0.1.3": { + "hash": "/ipfs/Qmb5np1WwZqvEfiLN36VW9Rexk2251F44HRYw8bK6fZQLY", + "uploadedTo": { + "dappnode": "Fri, 31 Oct 2025 13:37:03 GMT" + } + } +}