From 8aa084a48ca0a2e5acde359054483b878439822e Mon Sep 17 00:00:00 2001 From: Christian Anton Date: Mon, 30 Dec 2024 22:33:52 +0100 Subject: [PATCH] timestamp-based tags --- .github/workflows/docker.build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.build.yml b/.github/workflows/docker.build.yml index fb52151..a5b17bf 100644 --- a/.github/workflows/docker.build.yml +++ b/.github/workflows/docker.build.yml @@ -29,6 +29,10 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set Build Timestamp + id: timestamp + run: echo "BUILD_TIMESTAMP=$(date -u +%Y%m%d%H%M%S)" >> $GITHUB_ENV + - name: Build and Push Multi-Arch Docker Image uses: docker/build-push-action@v5 with: @@ -40,4 +44,4 @@ jobs: push: true tags: | ${{ env.IMAGE_NAME }}:${{ matrix.major_version }}-${{ github.run_id }} - ${{ env.IMAGE_NAME }}:${{ matrix.major_version }}-latest + ${{ env.IMAGE_NAME }}:${{ matrix.major_version }}-${{ env.BUILD_TIMESTAMP }}