-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tag PR image build as latest before scanning
This is less effort than passing the tag across steps 🤷♂️ Signed-off-by: Brad Davidson <[email protected]>
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,11 +27,12 @@ jobs: | |
run: | | ||
make local | ||
make package-image | ||
make tag-image-latest | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'rancher/k3s' | ||
image-ref: 'rancher/k3s:latest' | ||
format: 'table' | ||
severity: "HIGH,CRITICAL" | ||
output: "trivy-report.txt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
cd $(dirname $0)/.. | ||
|
||
. ./scripts/version.sh | ||
|
||
TAG=${TAG:-${VERSION_TAG}${SUFFIX}} | ||
REPO=${REPO:-rancher} | ||
IMAGE_NAME=${IMAGE_NAME:-k3s} | ||
|
||
IMAGE=${REPO}/${IMAGE_NAME}:${TAG} | ||
LATEST=${REPO}/${IMAGE_NAME}:latest | ||
docker image tag ${IMAGE} ${LATEST} | ||
echo Tagged ${IMAGE} as ${LATEST} |