Skip to content

Commit

Permalink
remove --single-target and update output artifact.json path
Browse files Browse the repository at this point in the history
  • Loading branch information
momentmaker committed Aug 12, 2024
1 parent 9274809 commit 2088c24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/actions/goreleaser-build-sign-publish/action_utils
Original file line number Diff line number Diff line change
Expand Up @@ -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/ *$//')
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/build-publish-develop-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2088c24

Please sign in to comment.