Skip to content

Commit

Permalink
Release input variable for tag checking (#326)
Browse files Browse the repository at this point in the history
* Release input variable for tag checking

* Remove whitespace

* Remove white space at rc-tag
  • Loading branch information
the1bit authored Dec 13, 2023
1 parent ef8ed61 commit 7fe318b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/check_tag_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ IMAGE_TAG=$(cat sec-scanners-config.yaml | grep "${SEC_SCAN_TO_CHECK}" | cut -d

# Get rc-tag
RC_TAG_TO_CHECK="${3:-rc-tag}"
RC_TAG=$(cat sec-scanners-config.yaml | grep "${RC_TAG_TO_CHECK}" | cut -d : -f 2)
RC_TAG=$(cat sec-scanners-config.yaml | grep "${RC_TAG_TO_CHECK}" | cut -d : -f 2 | xargs)

# Check IMAGE_TAG and required image tag
if [[ "$IMAGE_TAG" != "$DESIRED_TAG" ]] || [[ "$RC_TAG" != "$DESIRED_TAG" ]]; then
# ERROR: Tag issue
echo "Tags are not correct:
- wanted $DESIRED_TAG
- wanted: $DESIRED_TAG
- security-scanner image tag: $IMAGE_TAG
- rc-tag: $RC_TAG"
exit 1
Expand Down

0 comments on commit 7fe318b

Please sign in to comment.