diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index df48b4a7..d584678f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,6 +30,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Determine build args + run: | + date -u +"build_date=%Y-%m-%dT%H:%M:%SZ" >> $GITHUB_ENV + echo "vcs_ref=`git -C ./_modules/kitodo-production-docker rev-parse --short HEAD`" >> $GITHUB_ENV + - name: Build the OCR-D Kitodo.Production image from module and deploy to GitHub Container Repository uses: docker/build-push-action@v3 with: @@ -37,8 +42,8 @@ jobs: push: true tags: ${{ env.REGISTRY_PATH }}/kitodo_production:latest build-args: | - BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") - VCS_REF=$(git rev-parse --short HEAD) + BUILD_DATE=${{ env.build_date }} + VCS_REF=${{ env.vcs_ref }} BUILDER_TYPE=git BUILDER_GIT_COMMIT=ocrd-main BUILDER_GIT_SOURCE_URL=https://github.com/markusweigelt/kitodo-production/