Skip to content

Commit

Permalink
fix(ci): source date retrieval
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Klick <[email protected]>
  • Loading branch information
nathanklick committed Mar 22, 2024
1 parent d145b45 commit a0ec0d3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/node-zxc-build-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ jobs:
version: ${{ steps.effective-version.outputs.number }}
version-prefix: ${{ steps.effective-version.outputs.prefix }}
prerelease: ${{ steps.effective-version.outputs.prerelease }}
source-date: ${{ steps.parameters.outputs.source-date }}
steps:
- name: Install Semantic Version Tools
run: |
Expand Down Expand Up @@ -150,7 +149,6 @@ jobs:
echo "commit-prefix=${COMMIT_PREFIX}" >>"${GITHUB_OUTPUT}"
echo "commit-id=${{ github.sha }}" >>"${GITHUB_OUTPUT}"
echo "commit-id-short=$(echo "${{ github.sha }}" | cut -c1-8)" >>"${GITHUB_OUTPUT}"
echo "source-date=$(git log -1 --pretty=%ct)" >> "${GITHUB_OUTPUT}"
- name: Verify Version Update (As Specified)
if: ${{ inputs.version-policy == 'specified' && !cancelled() && !failure() }}
Expand Down Expand Up @@ -559,6 +557,11 @@ jobs:
workload_identity_provider: "projects/235822363393/locations/global/workloadIdentityPools/hedera-builds-pool/providers/hedera-builds-gh-actions"
service_account: "[email protected]"

- name: Commit Information
id: commit
run: |
echo "source-date=$(git log -1 --pretty=%ct)" >> "${GITHUB_OUTPUT}"
- name: Set Image Registry
id: set-registry
run: |
Expand Down Expand Up @@ -648,13 +651,13 @@ jobs:
- name: Build Network Node Image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
env:
SOURCE_DATE_EPOCH: ${{ needs.validate.outputs.source-date }}
SOURCE_DATE_EPOCH: ${{ steps.commit.outputs.source-date }}
with:
push: true
no-cache: true
platforms: linux/amd64,linux/arm64
build-args: |
SOURCE_DATE_EPOCH=${{ needs.validate.outputs.source-date }}
SOURCE_DATE_EPOCH=${{ steps.commit.outputs.source-date }}
context: hedera-node/infrastructure/docker/containers/production-next/hedera-network-node
tags: ${{ steps.set-registry.outputs.docker-tag-base }}/hedera-network-node:${{ needs.validate.outputs.version }}

Expand Down

0 comments on commit a0ec0d3

Please sign in to comment.