Skip to content

Latest commit

 

History

History
332 lines (279 loc) · 11.3 KB

README.md

File metadata and controls

332 lines (279 loc) · 11.3 KB

DAppNode Workflows

Centralized reusable GitHub Actions workflows for the DAppNode organization.

Available Workflows

Workflow Description Used by
bump-upstream.yml Check and bump upstream versions (tropibot bump-runner) All staking packages
staking-release.yml Build → test → release pipeline All staking packages
staking-sync-test.yml Sync test on PRs All staking packages
staking-attestation-test.yml Full proof-of-attestation test Staking packages using TropiBot commands
sync-production.yml Daily production sync + Discord notification EL packages
onchain-release-sync.yml Sync release metadata with on-chain published hashes Packages that use tropibot onchain sync
dappnode-build-hash.yml Build on PR / push, pin to IPFS, post IPFS hash comment on the PR All DAppNode packages
notify-discord.yml Discord failure notifications Internal (called by sync-production)

Usage

All caller stubs use secrets: inherit to pass org-level secrets automatically.

Bump Upstream

name: Bump upstream version
on:
  schedule:
    - cron: "00 */4 * * *"
  workflow_dispatch:
  push:
    branches: ["master", "main"]
jobs:
  bump-upstream:
    uses: dappnode/workflows/.github/workflows/bump-upstream.yml@master
    secrets: inherit

The workflow runs bump-runner pr from dappnode/tropibot:latest, which opens one bump PR per upstream with a new release. Existing Compose digest pins (version@sha256:…) are kept and refreshed for the new version.

Optional override inputs are available for repos that need explicit TropiBot bump configuration:

jobs:
  bump-upstream:
    uses: dappnode/workflows/.github/workflows/bump-upstream.yml@master
    with:
      upstream_repo: "testinprod-io/op-erigon"
      tag_pattern: "^v(.+)$"
    secrets: inherit
Input Default Meaning
upstream_repo all upstreams Upstream the override inputs below apply to
provider manifest / built-in default Version source: docker (GitHub release, validated against the image tag), github (release tag as-is), or docker_tags (highest image tag on Docker Hub or any OCI registry)
tag_pattern none Regex extracting the version from the release tag (capture group 1)
docker_tag_pattern inferred from the Dockerfile Docker tag template, e.g. multiarch-{version}
build_arg manifest arg Compose build argument holding the version
variants_dir package_variants Variants directory; override for legacy layouts
dry_run false Log GitHub writes instead of performing them
use_variants true Deprecated and ignored; variant directories are always scanned

For repos with mixed upstream version formats, omit override inputs and let bump-runner resolve the target Docker tag format per upstream through its registry inference path.

The run's result (bumped, up to date, skipped, errors) is written to the job summary. The job fails when any upstream fails.

Packages that need their own triggers, reviewers, or labels can instead update files with the bump-upstream action and open the PR themselves:

steps:
  - uses: actions/checkout@v6
  - id: bump
    uses: dappnode/workflows/actions/bump-upstream@master
    with:
      version: ${{ github.event.inputs.version }} # empty: latest version
      pin-digest: "true"
      provider: docker_tags # when versions come from image tags, not GitHub releases
  # Then open the PR, e.g. with peter-evans/create-pull-request, using
  # steps.bump.outputs.version and steps.bump.outputs.compose-version.

The action edits files only (no commit or PR). Outputs: version, compose-version (including the digest when pinned), digest, changed, upstream, and previous-version. It runs bump-runner update from the public dappnode/tropibot:latest image (set runner-image, e.g. dappnode/tropibot:v0.1.14, to pin a release) and needs a Linux runner with Docker. See action.yml for every input.

Release (Execution Client)

name: Release
on:
  workflow_dispatch:
    inputs:
      consensus_client:
        type: choice
        options: [lodestar, teku, prysm, nimbus, lighthouse]
  push:
    branches: ["main"]
    paths-ignore: ["README.md"]
jobs:
  release:
    uses: dappnode/workflows/.github/workflows/staking-release.yml@master
    with:
      consensus_client: ${{ inputs.consensus_client || '' }}
    secrets: inherit

Release (Consensus Client)

name: Release
on:
  workflow_dispatch:
    inputs:
      execution_client:
        type: choice
        options: [geth, nethermind, besu, erigon, reth]
  push:
    branches: ["main"]
    paths-ignore: ["README.md"]
jobs:
  release:
    uses: dappnode/workflows/.github/workflows/staking-release.yml@master
    with:
      consensus_client: "lodestar"
      execution_client: ${{ inputs.execution_client || '' }}
    secrets: inherit

Sync Test (Execution Client)

name: Execution Client Sync Test
on:
  workflow_dispatch:
    inputs:
      consensus_client:
        type: choice
        options: [lodestar, teku, prysm, nimbus, lighthouse]
  pull_request:
    branches: ["main"]
    paths-ignore: ["README.md"]
jobs:
  sync-test:
    uses: dappnode/workflows/.github/workflows/staking-sync-test.yml@master
    with:
      execution_client: "erigon"
      consensus_client: ${{ inputs.consensus_client || '' }}
    secrets: inherit

Sync Test (Consensus Client)

name: Execution Client Sync Test
on:
  workflow_dispatch:
    inputs:
      execution_client:
        type: choice
        options: [geth, nethermind, besu, erigon, reth]
  pull_request:
    branches: ["main"]
    paths-ignore: ["README.md"]
jobs:
  sync-test:
    uses: dappnode/workflows/.github/workflows/staking-sync-test.yml@master
    with:
      consensus_client: "lodestar"
      execution_client: ${{ inputs.execution_client || '' }}
    secrets: inherit

TropiBot Sync and Attestation Commands

staking-sync-test.yml and staking-attestation-test.yml share the same artifact-selection inputs:

  • Without ipfs_hash, the workflow checks out and builds the exact PR head.
  • With ipfs_hash, the build job is skipped and the supplied artifact is tested.
  • head_sha records the PR commit associated with the completed report. Existing repository-dispatch callers remain compatible because the workflows also read github.event.client_payload.head_sha directly.

Example attestation caller:

name: Proof of Attestation
on:
  repository_dispatch:
    types: [tropibot-attestation-test]

jobs:
  attestation-test:
    uses: dappnode/workflows/.github/workflows/staking-attestation-test.yml@master
    with:
      execution_client: "besu"
      consensus_client: ${{ github.event.client_payload.consensus_client || '' }}
      ipfs_hash: ${{ github.event.client_payload.ipfs_hash || '' }}
      pr_number: ${{ github.event.client_payload.pr_number || '' }}
      head_ref: ${{ github.event.client_payload.head_ref || '' }}
      head_sha: ${{ github.event.client_payload.head_sha || '' }}
      sender: ${{ github.event.client_payload.sender || github.actor }}
    secrets: inherit

Sync Production (Execution Clients only)

sync-production.yml sets SKIP_CLEANUP=true to keep the packages after syncing.

name: Execution Client Sync Production
on:
  schedule:
    - cron: "0 5 * * *"
  workflow_dispatch:
    inputs:
      consensus_client:
        type: choice
        options: [lodestar, teku, prysm, nimbus, lighthouse]
jobs:
  sync:
    uses: dappnode/workflows/.github/workflows/sync-production.yml@master
    with:
      execution_client: "erigon"
      consensus_client: ${{ inputs.consensus_client || '' }}
    secrets: inherit

Onchain Release Sync

name: Onchain Release Sync
on:
  schedule:
    - cron: "00 */6 * * *"
  workflow_dispatch:
    inputs:
      all_repos:
        type: boolean
        default: false
jobs:
  onchain-sync:
    uses: dappnode/workflows/.github/workflows/onchain-release-sync.yml@master
    with:
      all_repos: ${{ inputs.all_repos || false }}
      dry_run: ${{ github.event_name == 'workflow_dispatch' }}
    secrets: inherit

Build Hash (PR / push)

Builds the package on every push and PR, pins the result to IPFS via Pinata, and posts a comment with the install link on the triggering PR. Run on any non-main / non-master branch push (tropibot bump branches qualify) plus on PRs for fast feedback.

name: Build
on:
  workflow_dispatch:
  pull_request:
  push:
    paths-ignore: ["README.md"]
jobs:
  build:
    uses: dappnode/workflows/.github/workflows/dappnode-build-hash.yml@master
    secrets: inherit

For packages that publish multiple variants (e.g. gnosis, mainnet, hoodi):

jobs:
  build:
    uses: dappnode/workflows/.github/workflows/dappnode-build-hash.yml@master
    with:
      all_variants: true
    secrets: inherit

Or pick a specific subset:

jobs:
  build:
    uses: dappnode/workflows/.github/workflows/dappnode-build-hash.yml@master
    with:
      variants: "gnosis,mainnet,hoodi"
    secrets: inherit

Notes:

  • The workflow auto-detects the GitHub event; on push to a non-default branch it builds + pins to Pinata and comments the PR, on pull_request it runs a --skip_save build only.
  • The caller must have PINATA_API_KEY and PINATA_SECRET_API_KEY available as repository or org-level secrets (use secrets: inherit).

Packages Using These Workflows

Execution Clients

erigon, geth, nethermind, besu, reth — each has 4 stubs:

  • bump-upstream.yml → bump-upstream
  • release.yml → staking-release
  • sync-test.yml → staking-sync-test
  • sync-production.yml → sync-production

Consensus Clients

lodestar, lighthouse, nimbus, prysm, teku — each has 3 stubs:

  • bump-upstream.yml → bump-upstream
  • release.yml → staking-release
  • sync-test.yml → staking-sync-test

Required Org-Level Configuration

Secrets

  • TROPI_APP_PRIVATE_KEY — GitHub App private key for automated PRs/tokens
  • PINATA_API_KEY / PINATA_SECRET_API_KEY — IPFS pinning (bump-upstream)
  • DISCORD_STAKERS_TESTS_WEBHOOK — Discord failure notifications (sync-production)

Variables

  • TROPI_APP_ID — GitHub App ID (non-sensitive, accessed via vars context)

Self-Hosted Runners

  • staking-test-hoodi — DAppNode runner for build and sync tests
  • ipfs-dev-gateway — Runner with IPFS access for publishing

Design Decisions

  • secrets: inherit — minimal stubs, org-level secrets flow automatically
  • vars.TROPI_APP_ID — accessed from caller's vars context (no need to pass as secret)
  • @master ref — internal trust within org, no version pinning needed
  • dappnode/tropibot:latest — single Docker image for test-runner and bump-runner
  • Bidirectional testing — EL packages fix their client name and parameterize the CL, CL packages do the reverse