From 00ba9f1b090b03264c9356631ac68b91b9998cdd Mon Sep 17 00:00:00 2001 From: scx1332 Date: Thu, 26 Oct 2023 14:46:15 +0200 Subject: [PATCH] more elegant script --- .github/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d82519f..54eac1e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -131,14 +131,24 @@ jobs: run: | cp target/${{ matrix.target }}/release-lto/erc20_processor build/docker/erc20_processor cd build/docker + + # login to ghcr.io docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} + + # build with full metadata docker build \ --label "org.opencontainers.image.source=https://github.com/golemfactory/erc20_payment_lib" \ --label "org.opencontainers.image.description=Erc20 payment processor binary in docker alpine" \ --label "org.opencontainers.image.licenses=MIT" \ -t ghcr.io/golemfactory/erc20_processor:latest \ ./Dockerfile - docker tag ghcr.io/golemfactory/erc20_processor:latest ghcr.io/golemfactory/erc20_processor:${{ steps.version.outputs.version }} + + # tag image with the same tag as the release + docker tag \ + ghcr.io/golemfactory/erc20_processor:latest \ + ghcr.io/golemfactory/erc20_processor:${{ steps.version.outputs.version }} + + # push one image with two tags into repository docker push --all-tags ghcr.io/golemfactory/erc20_processor - name: Compress binaries