Skip to content

Commit

Permalink
fix: added additional directives
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Peterson <[email protected]>
  • Loading branch information
mattp-swirldslabs committed Dec 18, 2024
1 parent e0f1aae commit 21afc6b
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions .github/workflows/zxc-verify-docker-build-determinism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,44 @@ jobs:
run: |
mkdir -p "${{ github.workspace }}/${{ env.DOCKER_CONTEXT_PATH }}/sdk/data"
echo "::group::Copying Library Artifacts"
cp -Rvf "${{ github.workspace }}/hedera-node/data/lib" "${{ github.workspace }}/${{ env.DOCKER_CONTEXT_PATH }}/sdk/data/"
echo "::endgroup::"
echo "::group::Copying Application Artifacts"
cp -Rvf "${{ github.workspace }}/hedera-node/data/apps" "${{ github.workspace }}/${{ env.DOCKER_CONTEXT_PATH }}/sdk/data/"
echo "::endgroup::"
- name: Write Artifact Version Descriptor
run: |
printf "VERSION=%s\nCOMMIT=%s\nDATE=%s" "$(./gradlew -q showVersion)" "$(git log -1 --format='%H' | cut -c1-8)" "$(date -u)" | tee "${{ github.workspace }}/${{ env.DOCKER_CONTEXT_PATH }}/sdk/VERSION"
- name: Build Docker Image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
env:
SOURCE_DATE_EPOCH: ${{ steps.commit.outputs.source-date }}
if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
with:
push: true
no-cache: true
platforms: linux/amd64,linux/arm64
build-args: |
SOURCE_DATE_EPOCH=${{ steps.commit.outputs.source-date }}
context: ${{ env.DOCKER_CONTEXT_PATH }}
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ steps.commit.outputs.sha-abbrev }}

- name: Generate Manifest
id: manifest
env:
MANIFEST_PATH: ${{ env.DOCKER_MANIFEST_PATH }}
if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
run: GITHUB_SHA="${{ needs.generate-baseline.outputs.sha-abbrev }}" ${{ env.DOCKER_MANIFEST_GENERATOR }}

- name: Amend Manifest with Gradle Artifacts
if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
working-directory: ${{ env.DOCKER_MANIFEST_PATH }}
run: |
EXTRACTED_FILE_NAME="${{ steps.commit.outputs.sha }}.tar"
gunzip "${{ steps.manifest.outputs.name }}"
tar -rvf "${EXTRACTED_FILE_NAME}" -C "${{ github.workspace }}/${{ env.DOCKER_CONTEXT_PATH }}" sdk
gzip "${EXTRACTED_FILE_NAME}"
- name: Upload Baseline
if: ${{ steps.baseline.outputs.exists == 'false' && !failure() && !cancelled() }}
run: gsutil cp "${{ steps.manifest.outputs.file }}" "${{ steps.baseline.outputs.file }}"

0 comments on commit 21afc6b

Please sign in to comment.