1
0
Fork 0
forked from lthn/blockchain

Add Docker build workflow and update push workflow

Introduces a new build-docker.yml GitHub Actions workflow for building and pushing Docker images. Updates the _on-push.yml workflow to include the Docker build job and renames job names for consistency.
This commit is contained in:
Snider 2025-09-27 17:14:12 +01:00
parent 80595a676d
commit f5cd385fb3
2 changed files with 52 additions and 5 deletions

View file

@ -1,4 +1,4 @@
name: Push Full Build
name: Push Compile
permissions:
contents: read
on:
@ -16,29 +16,35 @@ concurrency:
jobs:
build-linux:
name: Compile
name: Chain
uses: ./.github/workflows/build-linux.yml
with:
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
build-windows:
name: Compile
name: Chain
uses: ./.github/workflows/build-windows.yml
with:
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
build-macos-arm64:
name: Compile
name: Chain
uses: ./.github/workflows/build-macos-arm64.yml
with:
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
build-macos-intel:
name: Compile
name: Chain
uses: ./.github/workflows/build-macos-intel.yml
with:
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
build-docker:
name: Docker
uses: ./.github/workflows/build-docker.yml
with:
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
build-docs:
name: Docs
uses: ./.github/workflows/build-docs.yml

41
.github/workflows/build-docker.yml vendored Normal file
View file

@ -0,0 +1,41 @@
name: Docker
permissions:
contents: read
on:
workflow_call:
inputs:
chain-network:
description: "The network to use, can either be testnet, stagenet or mainnet"
default: testnet
required: false
type: string
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout Project
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
file: utils/docker/images/chain-node
context: .
push: true
tags: lthn/chain:${{ inputs.chain-network == 'testnet' && 'testnet' || 'latest' }}