mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
ci: 💚 Correctly input Git SHA into docker build
This commit is contained in:
parent
bc25896ed8
commit
39d9b4c031
5
.github/workflows/docker-publish.yml
vendored
5
.github/workflows/docker-publish.yml
vendored
|
|
@ -53,6 +53,9 @@ jobs:
|
||||||
uses: docker/metadata-action@v5 # v5.0.0
|
uses: docker/metadata-action@v5 # v5.0.0
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
- name: Get the commit hash
|
||||||
|
run: echo "GIT_COMMIT=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
|
|
@ -63,7 +66,7 @@ jobs:
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")
|
GIT_COMMIT=${{ env.GIT_COMMIT }}
|
||||||
provenance: mode=max
|
provenance: mode=max
|
||||||
sbom: true
|
sbom: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue