Skip to content

moved go.mod and go.sum under fabric-x to allow usage of semver… #8

moved go.mod and go.sum under fabric-x to allow usage of semver…

moved go.mod and go.sum under fabric-x to allow usage of semver… #8

Workflow file for this run

#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
name: Build Image
on:
push:
tags:
- "v*"
permissions:
packages: write # needed for GHCR (TODO add)
jobs:
image-build:
name: Docker Image Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU for cross-platform builds
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Build and push the fabric-x-tools image
uses: docker/build-push-action@v6
with:
context: ./tools
file: ./tools/Dockerfile
platforms: linux/amd64,linux/arm64,linux/s390x
push: true
build-args: |
FABRIC_X_VERSION=${{ github.ref_name }}
tags: |
docker.io/hyperledger/fabric-x-tools:${{ env.VERSION }}
docker.io/hyperledger/fabric-x-tools:latest