|
| 1 | +name: "Release" |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + execution_client: |
| 6 | + description: "Execution Client" |
| 7 | + required: true |
| 8 | + type: choice |
| 9 | + options: ["geth", "nethermind", "besu", "erigon", "reth"] |
| 10 | + push: |
| 11 | + branches: |
| 12 | + - "main" |
| 13 | + paths-ignore: |
| 14 | + - "README.md" |
| 15 | + |
| 16 | +jobs: |
| 17 | + build: |
| 18 | + runs-on: staking-test-hoodi |
| 19 | + name: Build |
| 20 | + outputs: |
| 21 | + ipfs_hash: ${{ steps.extract_hash.outputs.ipfs_hash }} |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v6 |
| 24 | + - name: Build and upload |
| 25 | + run: npx @dappnode/dappnodesdk build --provider=http://$(docker inspect DAppNodeCore-ipfs.dnp.dappnode.eth --format '{{.NetworkSettings.Networks.dncore_network.IPAddress}}'):5001 --variant=hoodi |
| 26 | + - name: Extract IPFS hash from releases.json |
| 27 | + id: extract_hash |
| 28 | + run: | |
| 29 | + # Get the last key's hash from releases.json |
| 30 | + IPFS_HASH=$(jq -r 'to_entries | last | .value.hash' package_variants/hoodi/releases.json) |
| 31 | + echo "ipfs_hash=$IPFS_HASH" >> $GITHUB_OUTPUT |
| 32 | + echo "Extracted IPFS hash: $IPFS_HASH" |
| 33 | +
|
| 34 | + test: |
| 35 | + name: Test |
| 36 | + runs-on: staking-test-hoodi |
| 37 | + needs: [build] |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v6 |
| 40 | + - name: Run staker test runner |
| 41 | + run: | |
| 42 | + docker run --rm --pull=always \ |
| 43 | + --network dncore_network -e EXECUTION_CLIENT=${{ github.event.inputs.execution_client }} \ |
| 44 | + -v /var/run/docker.sock:/var/run/docker.sock \ |
| 45 | + -e MODE=test -e IPFS_HASH=${{ needs.build.outputs.ipfs_hash }} \ |
| 46 | + -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 }} \ |
| 47 | + ghcr.io/dappnode/staker-test-util/test-runner:latest |
| 48 | +
|
| 49 | + release: |
| 50 | + name: Release |
| 51 | + runs-on: ipfs-dev-gateway |
| 52 | + needs: [test] |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v6 |
| 55 | + - uses: actions/setup-node@v6 |
| 56 | + with: |
| 57 | + node-version: "22" |
| 58 | + - name: Publish |
| 59 | + run: npx @dappnode/dappnodesdk publish patch --content_provider=http://10.200.200.7:5001 --eth_provider=https://web3.dappnode.net --timeout 2h --all-variants |
| 60 | + env: |
| 61 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 62 | + DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1" |
0 commit comments