From 2088c245271cdbaa91400981ace6f9d4a34b88f7 Mon Sep 17 00:00:00 2001 From: frank zhu Date: Mon, 12 Aug 2024 17:53:42 -0500 Subject: [PATCH] remove --single-target and update output artifact.json path --- .../action_utils | 1 - .../workflows/build-publish-develop-pr.yml | 19 +++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/actions/goreleaser-build-sign-publish/action_utils b/.github/actions/goreleaser-build-sign-publish/action_utils index 5ece705f037..051e0763fbd 100755 --- a/.github/actions/goreleaser-build-sign-publish/action_utils +++ b/.github/actions/goreleaser-build-sign-publish/action_utils @@ -65,7 +65,6 @@ goreleaser_release() { fi if [[ $ENABLE_GORELEASER_SPLIT == "true" ]]; then goreleaser_flags+=("--split") - goreleaser_flags+=("--single-target") fi flags=$(printf "%s " "${goreleaser_flags[@]}") flags=$(echo "$flags" | sed 's/ *$//') diff --git a/.github/workflows/build-publish-develop-pr.yml b/.github/workflows/build-publish-develop-pr.yml index 90522fa9765..3aafda7a18d 100644 --- a/.github/workflows/build-publish-develop-pr.yml +++ b/.github/workflows/build-publish-develop-pr.yml @@ -72,17 +72,20 @@ jobs: if: steps.get-image-tag.outputs.build-publish == 'true' shell: bash run: | - ls -al dist - ls -al dist/linux_${{ matrix.goarch }} # need to check if artifacts.json exists because goreleaser splits the build if [[ -f dist/artifacts.json ]]; then - echo "### Docker Images" | tee -a "$GITHUB_STEP_SUMMARY" - jq -r '.[] | select(.type == "Docker Image") | "`\(.goarch)-image`: \(.name)"' dist/artifacts.json >> output.txt - jq -r '.[] | select(.type == "Archive") | "`\(.goarch)-digest`: \(.extra.Checksum)"' dist/artifacts.json >> output.txt - while read -r line; do - echo "$line" | tee -a "$GITHUB_STEP_SUMMARY" - done < output.txt + ls dist + artifact_path="dist/artifacts.json" + else + ls dist/linux_${{ matrix.goarch }} + artifact_path="dist/linux_${{ matrix.goarch }}/artifacts.json" fi + echo "### Docker Images" | tee -a "$GITHUB_STEP_SUMMARY" + jq -r '.[] | select(.type == "Docker Image") | "`\(.goarch)-image`: \(.name)"' ${artifact_path} >> output.txt + jq -r '.[] | select(.type == "Archive") | "`\(.goarch)-digest`: \(.extra.Checksum)"' ${artifact_path} >> output.txt + while read -r line; do + echo "$line" | tee -a "$GITHUB_STEP_SUMMARY" + done < output.txt - name: Collect Metrics if: always()