Skip to content

Commit 419d120

Browse files
author
cx-Margarita-LevitM
committed
Add a check to ensure that the latest CLI version is verified only for the main branch, not for development releases.
1 parent 872e018 commit 419d120

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ jobs:
9393
- name: Check if CLI version is latest
9494
id: check_latest_cli_version
9595
run: |
96+
if [ "${{ inputs.dev }}" == "false" ] || [ -n "${{ inputs.cliTag }}" ] || [ "${{ github.ref }}" != "refs/heads/main" ]; then
97+
exit 0
98+
fi
99+
96100
API_RESPONSE=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/Checkmarx/ast-cli/releases/latest)
97101
LATEST_CLI_VERSION=$(echo "$API_RESPONSE" | grep -o '"tag_name"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)"/\1/' | sed 's/^v//')
98102

0 commit comments

Comments
 (0)