Skip to content

Commit

Permalink
GH action: Add missing env vars used in OCI labels
Browse files Browse the repository at this point in the history
  • Loading branch information
schnatterer committed Nov 6, 2023
1 parent 96c1154 commit cbac169
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

0 comments on commit cbac169

Please sign in to comment.