Skip to content

Commit 8aef9de

Browse files
authored
Tag all docker images with the current commit SHA (#132)
This allows easily referring to arbitrary pre-built images from docker files.
1 parent 575348e commit 8aef9de

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/build-docker.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ jobs:
3030
id: push
3131
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
3232
with:
33-
push: ${{ github.ref == 'refs/heads/main' }} # only push to ghcr.io on the main branch
34-
tags: ghcr.io/${{github.repository}}:latest
33+
# Only push to ghcr.io on pushes to the main branch
34+
push: ${{ github.ref == 'refs/heads/main' }}
35+
# Tag images with the current SHA and with 'latest'
36+
tags: "ghcr.io/llvm/llvm-lnt:latest,ghcr.io/llvm/llvm-lnt:${{ github.sha }}"
3537
file: docker/lnt.dockerfile
36-
context: . # use the current directory as context, as checked out by actions/checkout -- needed for setuptools_scm
38+
# Use the current directory as context, as checked out by actions/checkout -- needed for setuptools_scm
39+
context: .

0 commit comments

Comments
 (0)