From 6e100efabc529a4a39fb58ddd38b943f3f358dc7 Mon Sep 17 00:00:00 2001 From: Niek Candaele Date: Sat, 17 Aug 2024 20:55:22 +0200 Subject: [PATCH 1/3] chore: tag main branch as latest --- .github/workflows/docker.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0b56f3ad31..b4802b4ea1 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -76,7 +76,9 @@ jobs: sbom: true file: ${{ matrix.package.dockerfile }} push: ${{ !startsWith(github.actor, 'renovate') }} - tags: ${{ steps.meta.outputs.tags }} + tags: | + ${{ steps.meta.outputs.tags }} + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} labels: ${{ steps.meta.outputs.labels }} build-args: | PACKAGE=${{ matrix.package.name }} From 2df51bcbfebad36800a3ac3e819996343a8fa68d Mon Sep 17 00:00:00 2001 From: Niek Candaele Date: Sat, 17 Aug 2024 20:57:25 +0200 Subject: [PATCH 2/3] fix: move latest config --- .github/workflows/docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b4802b4ea1..6af83ee6fa 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -49,6 +49,8 @@ jobs: uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.package.name }} + tags: | + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - name: Get Git commit timestamps run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV @@ -76,9 +78,7 @@ jobs: sbom: true file: ${{ matrix.package.dockerfile }} push: ${{ !startsWith(github.actor, 'renovate') }} - tags: | - ${{ steps.meta.outputs.tags }} - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | PACKAGE=${{ matrix.package.name }} From e8dce7b3a1db728f6ffb133b4a1c7957b18e450f Mon Sep 17 00:00:00 2001 From: Niek Candaele Date: Sat, 17 Aug 2024 21:00:07 +0200 Subject: [PATCH 3/3] fix: also include default tags cfg --- .github/workflows/docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6af83ee6fa..058ead9322 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -51,6 +51,10 @@ jobs: images: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-${{ matrix.package.name }} tags: | type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=schedule + type=ref,event=branch + type=ref,event=tag + type=ref,event=pr - name: Get Git commit timestamps run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV