Skip to content

Commit d0fb006

Browse files
committed
Update update-cli.yml
1 parent bbf2bba commit d0fb006

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/update-cli.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
new_cli_version:
7-
description: 'New CLI version'
7+
description: 'New CLI version (optional)'
88
required: false
99
schedule:
1010
- cron: '0 0 * * *'
@@ -20,7 +20,11 @@ jobs:
2020
- name: Get Latest Checkmarx API version
2121
id: checkmarx-ast-cli
2222
run: |
23-
LATEST_VERSION=$(curl -sL https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | jq -r ".tag_name")
23+
if [ "${{ github.event.inputs.new_cli_version }}" ]; then
24+
LATEST_VERSION=${{ github.event.inputs.new_cli_version }}
25+
else
26+
LATEST_VERSION=$(curl -sL https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | jq -r ".tag_name")
27+
fi
2428
CURRENT_VERSION=$(<checkmarx-ast-cli.version)
2529
echo ::set-output name=release_tag::$LATEST_VERSION
2630
echo ::set-output name=current_tag::$CURRENT_VERSION

0 commit comments

Comments
 (0)