Support target upgrade version in update-codeql.yml workflow#160
Merged
data-douser merged 2 commits intomainfrom Mar 23, 2026
Merged
Support target upgrade version in update-codeql.yml workflow#160data-douser merged 2 commits intomainfrom
update-codeql.yml workflow#160data-douser merged 2 commits intomainfrom
Conversation
This commit adds an optional input to the "workflow_dispatch" trigger for the update-codeql.yml actions workflow in order to add support for using the workflow to upgarde to a target version (other than just latest) for the CodeQL CLI.
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
Enhances the update-codeql.yml GitHub Actions workflow to allow manually selecting a target CodeQL CLI version (in addition to the existing nightly “latest” update flow), with validation against github/codeql-cli-binaries releases.
Changes:
- Adds a
workflow_dispatchinput (target_version) to optionally specify a CodeQL CLI version. - Updates the “detect latest version” step to use the provided target version when set, and validate it exists as a release.
- Adjusts logging/output wording to reflect “target” vs “latest” selection.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.github/workflows/update-codeql.yml:86
latest_clean/latest_versionare now used to mean the selected target version (which may be manually specified and not actually the latest). This is a bit misleading for downstream steps and summaries—consider renaming the variables/outputs totarget_version/desired_version(or similar), or emit an additional output alongsidelatest_versionto disambiguate when a manual version was provided.
echo "Current CodeQL CLI version: ${current_version}"
echo "Target CodeQL CLI version: ${latest_clean}"
if [ "${latest_clean}" != "${current_version}" ]; then
echo "✅ Update available: ${current_version} → ${latest_clean}"
echo "update_needed=true" >> $GITHUB_OUTPUT
echo "current_version=${current_version}" >> $GITHUB_OUTPUT
echo "latest_version=${latest_clean}" >> $GITHUB_OUTPUT
echo "version=v${latest_clean}" >> $GITHUB_OUTPUT
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request enhances the
update-codeql.ymlGitHub Actions workflow by allowing manual selection of the target CodeQL CLI version, in addition to the existing automatic nightly update. The workflow now accepts an optional input for specifying a desired version and validates its existence before proceeding.Manual version selection and validation:
target_versioninput to the workflow, allowing users to specify a desired CodeQL CLI version when manually triggering the workflow. (.github/workflows/update-codeql.yml)target_versionif provided, including validation to ensure the version exists in thegithub/codeql-cli-binariesreleases. If not provided, the workflow continues to fetch the latest release as before. (.github/workflows/update-codeql.yml).github/workflows/update-codeql.yml)