mirror of
https://github.com/logos-co/nomos-node.git
synced 2026-08-27 09:31:10 +00:00
85 lines
2.8 KiB
YAML
85 lines
2.8 KiB
YAML
name: Publish Logos Blockchain Node Docker Image
|
|
|
|
on:
|
|
release:
|
|
types: [published, created]
|
|
workflow_dispatch:
|
|
inputs:
|
|
lc_core_version:
|
|
description: 'LC Core Version'
|
|
required: false
|
|
default: '0.2.0'
|
|
type: string
|
|
lb_node_version:
|
|
description: 'LB Node Version'
|
|
required: true
|
|
type: string
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository_owner }}/logos-blockchain-node
|
|
LC_CORE_VERSION: ${{ inputs.lc_core_version }}
|
|
LB_NODE_VERSION: ${{ inputs.lb_node_version }}
|
|
VERSION_TAG: ${{ github.ref_name }}
|
|
LATEST_TAG: ${{ contains(github.ref_name, '-rc.') && 'latest-rc' || 'latest' }}
|
|
|
|
jobs:
|
|
push_to_registries:
|
|
name: Push Docker image to multiple registries
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
attestations: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Check out the repo
|
|
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 # Version 4.2.2
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # Version 3.7.0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@afeb29a6e0d7d6258844ecabe6eba67d13443680 # Version 3.10.0
|
|
with:
|
|
driver: docker-container
|
|
install: true
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # Version 3.4.0
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # Version 5.7.0
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
|
|
- name: Build and push multi-platform Docker images
|
|
id: push
|
|
uses: docker/build-push-action@84ad562665bb303b549fec655d1b64f9945f3f91 # Version 6.15.0
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
build-args: |
|
|
LC_CORE_VERSION=${{ env.LC_CORE_VERSION }}
|
|
LB_NODE_VERSION=${{ env.LB_NODE_VERSION }}
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION_TAG }}
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.LATEST_TAG }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
- name: Generate artifact attestation
|
|
uses: actions/attest-build-provenance@9d3beef6515cb82652d066f999b94affc15acfac # Version 2.2.3
|
|
with:
|
|
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
subject-digest: ${{ steps.push.outputs.digest }}
|
|
push-to-registry: true
|