Skip to content

Commit

Permalink
timestamp-based tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Anton committed Dec 30, 2024
1 parent eb529b3 commit 8aa084a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/docker.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

0 comments on commit 8aa084a

Please sign in to comment.