From 8d48c4918279ff8b2f31791d8fd46b5eb826f5bc Mon Sep 17 00:00:00 2001 From: John Gomersall Date: Thu, 21 Nov 2024 14:13:05 +0000 Subject: [PATCH] Add tags consistent with query and robotoff Signed-off-by: John Gomersall --- .github/workflows/container-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index 7307d9a7..ac3575ff 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -47,6 +47,11 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=ref,event=pr + type=ref,event=branch + type=sha,format=long - name: Prepare Docker build run: mkdir target && make build @@ -56,6 +61,8 @@ jobs: with: context: . push: ${{ github.event_name != 'pull_request' }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache + cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64