Skip to content

Commit

Permalink
cicd: improve nightly script output
Browse files Browse the repository at this point in the history
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Apr 18, 2024
1 parent 08581d8 commit c42bee6
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/script/nightly-module.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
#!/bin/sh
set -e
: "${CLAIRCORE_BRANCH:=main}"

echo "::group::go version"
cd "$(git rev-parse --show-toplevel)"
go version
echo "::endgroup::"

test -d vendor && rm -rf vendor

echo "::group::Changes"
echo "::group::Edits"
go mod edit \
"-replace=github.com/quay/claircore=github.com/quay/claircore@${CLAIRCORE_BRANCH}"
go mod tidy
go mod download # Shouldn't be needed, but just to be safe...
git diff
echo "::endgroup::"

clair_version="$(git describe --tags --always --dirty --match 'v4.*')"
echo "::notice::Clair version: ${clair_version}"
echo "clair_version=${clair_version}" >> "$GITHUB_OUTPUT"

cat <<. >>"$GITHUB_STEP_SUMMARY"
### Changes
- **Go version:** $(go version)
- **Clair version:** ${clair_version}
.
{
echo '```patch'
git diff
echo '```'
} >>"$GITHUB_STEP_SUMMARY"

0 comments on commit c42bee6

Please sign in to comment.