From 35184e16172e8b2500a4668959847fca33eb8988 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Thu, 22 Sep 2022 16:38:16 +0100 Subject: [PATCH] Replace invalid docker tag characters (#2366) --- .github/workflows/build-simd-image-from-tag.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-simd-image-from-tag.yml b/.github/workflows/build-simd-image-from-tag.yml index 177d3997ec8..1e927579df0 100644 --- a/.github/workflows/build-simd-image-from-tag.yml +++ b/.github/workflows/build-simd-image-from-tag.yml @@ -11,7 +11,7 @@ env: REGISTRY: ghcr.io ORG: cosmos IMAGE_NAME: ibc-go-simd - VERSION: "${{ inputs.tag }}" + GIT_TAG: "${{ inputs.tag }}" jobs: build-image-at-tag: @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: "${{ env.VERSION }}" + ref: "${{ env.GIT_TAG }}" fetch-depth: 0 - name: Log in to the Container registry uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b @@ -31,5 +31,7 @@ jobs: run: curl https://raw.githubusercontent.com/cosmos/ibc-go/main/Dockerfile -o Dockerfile - name: Build image run: | - docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${VERSION}" - docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${VERSION}" + # remove any `/` characters from the docker tag and replace them with a - + docker_tag="$(echo $GIT_TAG | sed 's/\//-/')" + docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}" + docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}"