diff --git a/.github/workflows/prw-deploy-preview.yml b/.github/workflows/prw-deploy-preview.yml index 0c168fc9..7d0a347c 100644 --- a/.github/workflows/prw-deploy-preview.yml +++ b/.github/workflows/prw-deploy-preview.yml @@ -173,13 +173,15 @@ jobs: SOURCE_DIR: './public-update' DEST_DIR: "s3://${{ secrets.PREVIEW_AWS_BUCKET_NAME }}/pr${{ needs.determine-sync-status.outputs.pr-number }}" - - name: Calculate checksums for S3 bucket files and compare with CI checksums + - name: Calculate checksums for S3 bucket files run: | TEMP_DIR=$(mktemp -d) aws s3 sync "s3://${{ secrets.PREVIEW_AWS_BUCKET_NAME }}/pr${{ needs.determine-sync-status.outputs.pr-number }}" "$TEMP_DIR" --follow-symlinks cd "$TEMP_DIR" - find . -type f -exec sha256sum {} + | awk '{print $2, $1}' | sort > "$GITHUB_WORKSPACE/checksums-s3-verify.txt" + find . -type f ! -name "checksums-s3.txt" -exec sha256sum {} + | awk '{print $2, $1}' | sort > "$GITHUB_WORKSPACE/checksums-s3-verify.txt" + - name: Compare checksums of S3 bucket and CI files + run: | cd "$GITHUB_WORKSPACE" if diff checksums-ci.txt checksums-s3-verify.txt > diff-output.txt; then echo "Checksums match. No differences found."