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
|
|
@ -54,6 +54,9 @@ jobs:
|
|||
with:
|
||||
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
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v5 # v5.0.0
|
||||
|
|
@ -63,7 +66,7 @@ jobs:
|
|||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")
|
||||
GIT_COMMIT=${{ env.GIT_COMMIT }}
|
||||
provenance: mode=max
|
||||
sbom: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
|
|
|||
Loading…
Reference in a new issue