Skip to content

Commit ec19a85

Browse files
committed
Address PR review feedback for update-codeql.yml
1 parent 5690309 commit ec19a85

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/update-codeql.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,17 @@ jobs:
4040
id: check-version
4141
env:
4242
GH_TOKEN: ${{ github.token }}
43-
TARGET_VERSION: ${{ inputs.target_version }}
43+
TARGET_VERSION: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_version || '' }}
4444
run: |
4545
echo "Checking latest CodeQL CLI version..."
4646
4747
# Read current version from .codeql-version (stores vX.Y.Z)
4848
current_version_raw=$(cat .codeql-version | tr -d '[:space:]')
4949
current_version="${current_version_raw#v}"
5050
51+
# Trim whitespace from target version input
52+
TARGET_VERSION=$(echo "${TARGET_VERSION}" | tr -d '[:space:]')
53+
5154
if [ -n "${TARGET_VERSION}" ]; then
5255
# Use the manually specified target version
5356
latest_clean="${TARGET_VERSION#v}"

0 commit comments

Comments
 (0)