Skip to content

Commit

Permalink
Merge pull request #41 from slub/fix-build-args
Browse files Browse the repository at this point in the history
CI: determine build args dynamically
  • Loading branch information
markusweigelt authored Oct 26, 2022
2 parents efc7f1c + 53330ee commit 526ccdb
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@ 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 rev-parse --short HEAD`" >> $GITHUB_ENV
- name: Build the OCR-D Manager image and deploy to GitHub Container Repository
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ env.REGISTRY_PATH }}/ocrd_manager: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 }}
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -46,7 +51,7 @@ jobs:
push: true
tags: ${{ env.REGISTRY_PATH }}/ocrd_monitor: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 }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 526ccdb

Please sign in to comment.