Skip to content

Commit

Permalink
Use predefined image tag
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilKWarmdahl committed Oct 28, 2024
1 parent c875d92 commit b1bff3e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand All @@ -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}}
echo ${{env.IMAGE_NAME}}:${{env.IMAGE_TAG}}

0 comments on commit b1bff3e

Please sign in to comment.