From cbac169942ff2f11895001a7c9e3ab561897f5cb Mon Sep 17 00:00:00 2001 From: schnatterer Date: Mon, 6 Nov 2023 10:02:54 +0100 Subject: [PATCH] GH action: Add missing env vars used in OCI labels --- .github/workflows/docker-image.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e6a7a4b..1742e31 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -31,6 +31,9 @@ jobs: TAGS="${GHCR_IMAGE}:latest,${GHCR_IMAGE}:${VERSION},${GHCR_IMAGE}:${VERSION_DATE}" echo "TAGS=${TAGS}" | tee -a $GITHUB_ENV echo "VERSION=${VERSION}" | tee -a $GITHUB_ENV + echo "BUILD_DATE=$(date +'%Y-%m-%d %H:%M:%S')" | tee -a $GITHUB_ENV + echo "GIT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" | tee -a $GITHUB_ENV + echo "GIT_REF=$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match)" | tee -a $GITHUB_ENV - name: Build and push id: docker_build uses: docker/build-push-action@v5 @@ -47,4 +50,4 @@ jobs: org.opencontainers.image.revision=${{ env.GIT_SHA }} org.opencontainers.image.source=https://github.com/${{ github.repository }} org.opencontainers.image.description=Created from commit ${{ env.GIT_SHA}} and ref ${{ env.GIT_REF }} - \ No newline at end of file +