mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
Save the git commit and build date of the docker images
This commit is contained in:
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
@@ -71,6 +71,9 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Set build date
|
||||
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push by digest
|
||||
id: build
|
||||
uses: docker/build-push-action@v6
|
||||
@@ -81,6 +84,9 @@ jobs:
|
||||
platforms: ${{ matrix.platform }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
build-args: |
|
||||
BUILD_DATE=${{ env.BUILD_DATE }}
|
||||
BUILD_COMMIT=${{ github.sha }}
|
||||
|
||||
# https://github.com/moby/buildkit#--export-cache-options
|
||||
# https://github.com/docker/buildx#--cache-tonametypetypekeyvalue
|
||||
|
||||
Reference in New Issue
Block a user