Skip to content

Merge pull request #125 from hyperledger/base_image #1

Merge pull request #125 from hyperledger/base_image

Merge pull request #125 from hyperledger/base_image #1

name: Docker Release Build
on:
release:
types: [released, prereleased]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
docker build \
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${GITHUB_REF##*/} \
<<<<<<< HEAD

Check failure on line 19 in .github/workflows/docker_release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker_release.yml

Invalid workflow file

You have an error in your yaml syntax on line 19
<<<<<<< HEAD
=======
--build-arg BASE_IMAGE=alpine:3.19 \
--build-arg BUILD_IMAGE=golang:1.21-alpine3.19 \
>>>>>>> 66e0aba (Add build image arg)
=======
--build-arg BASE_IMAGE=alpine:3.19 \
--build-arg BUILD_IMAGE=golang:1.21-alpine3.19 \
>>>>>>> 3a3c7af (Merge pull request #125 from hyperledger/base_image)
--tag ghcr.io/hyperledger/firefly-fabconnect:${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly-fabconnect:head \
.
- name: Tag release
if: github.event.action == 'released'
run: docker tag ghcr.io/hyperledger/firefly-fabconnect:${GITHUB_REF##*/} ghcr.io/hyperledger/firefly-fabconnect:latest
- name: Push docker image
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-fabconnect:${GITHUB_REF##*/}
- name: Push head tag
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-fabconnect:head
- name: Push latest tag
if: github.event.action == 'released'
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-fabconnect:latest