Skip to content

Commit 6669dd1

Browse files
committed
GHA: Also tag docker image with branch-shortref
1 parent c989b13 commit 6669dd1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/mirageos.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,21 @@ jobs:
2828
registry: ghcr.io
2929
username: ${{ github.actor }}
3030
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Setup env
33+
run: echo "SHORTREF=$(echo $GITHUB_SHA | cut -c1-12)" >> $GITHUB_ENV
34+
3135
- name: Build Docker image
3236
id: docker_build
33-
uses: docker/build-push-action@v5
37+
uses: docker/build-push-action@v6
3438
with:
3539
context: .
3640
file: ./docker/Dockerfile.muen-mirageos
3741
platforms: linux/amd64
3842
push: ${{ github.ref == 'refs/heads/devel-59e3fac208fc-bob-publish' }}
3943
cache-from: type=local,src=/tmp/.buildx-cache
4044
cache-to: type=local,dest=/tmp/.buildx-cache
41-
tags: ghcr.io/codelabs-ch/muen-mirageos:latest
45+
tags: |
46+
ghcr.io/codelabs-ch/muen-mirageos:latest
47+
ghcr.io/codelabs-ch/muen-mirageos:${{ github.ref_name }}
48+
ghcr.io/codelabs-ch/muen-mirageos:${{ github.ref_name }}-${{ env.SHORTREF }}

0 commit comments

Comments
 (0)