Skip to content

Commit

Permalink
CI: add hash of Dockerfile and docker-build.yml to image version
Browse files Browse the repository at this point in the history
This will ensure the container gets rebuilt whenever I change anything
in those files.
  • Loading branch information
yut23 committed Jan 4, 2025
1 parent 8a67935 commit 10f1d65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: |
gcc_versions=${{ inputs.gcc-versions }}
llvm_versions=${{ inputs.llvm-versions }}
IMAGE_VERSION="ubuntu-${{ inputs.ubuntu-version }}-gcc-${gcc_versions/,/-}-llvm-${llvm_versions/,/-}"
IMAGE_VERSION="ubuntu-${{ inputs.ubuntu-version }}-gcc-${gcc_versions/,/-}-llvm-${llvm_versions/,/-}-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/docker-build.yml') }}"
echo "image-version=$IMAGE_VERSION" >> $GITHUB_OUTPUT
if docker manifest inspect $REGISTRY/$IMAGE_NAME:$IMAGE_VERSION; then
echo "in-registry=true" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 10f1d65

Please sign in to comment.