From b1bff3ed7c3fcd9a28bb948d64cf0999ac2289cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Mon, 28 Oct 2024 09:09:11 +0100 Subject: [PATCH] Use predefined image tag --- .github/workflows/docker-release.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml index f120a383..8d120849 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -6,6 +6,7 @@ on: env: RUST_VERSION: "1.73.0" GHC_VERSION: "9.6.4" + IMAGE_TAG: rust1.73-ghc9.6.4 jobs: release-base-image: @@ -20,7 +21,7 @@ jobs: - name: Check if image exist run: | set +e - docker manifest inspect ${{env.IMAGE_NAME}}:rust${{env.RUST_VERSION}}-ghc${{env.GHC_VERSION}} + docker manifest inspect ${{env.IMAGE_NAME}}:${{env.IMAGE_TAG}} exitcode=$? if [ $exitcode -eq "1" ]; then echo "Error: ${{env.IMAGE_NAME}}:rust${{env.RUST_VERSION}}-ghc${{env.GHC_VERSION}} already exist" @@ -39,8 +40,8 @@ jobs: - name: build docker image run: | - docker build --build-arg rust_version="${{env.RUST_VERSION}}" --build-arg ghc_version="${{env.GHC_VERSION}}" --label rust_version="${{env.RUST_VERSION}}" --label ghc_version="${{env.GHC_VERSION}}" -f "docker/base.Dockerfile" -t "${{env.IMAGE_NAME}}:rust${{env.RUST_VERSION}}-ghc${{env.GHC_VERSION}}" . + docker build --build-arg rust_version="${{env.RUST_VERSION}}" --build-arg ghc_version="${{env.GHC_VERSION}}" --label rust_version="${{env.RUST_VERSION}}" --label ghc_version="${{env.GHC_VERSION}}" -f "docker/base.Dockerfile" -t "${{env.IMAGE_NAME}}:${{env.IMAGE_TAG}}" . - name: Push docker image run: | - echo ${{env.IMAGE_NAME}}:rust${{env.RUST_VERSION}}-ghc${{env.GHC_VERSION}} \ No newline at end of file + echo ${{env.IMAGE_NAME}}:${{env.IMAGE_TAG}} \ No newline at end of file