Skip to content

Support target upgrade version in update-codeql.yml workflow#160

Merged
data-douser merged 2 commits intomainfrom
dd/release-prep/v2-24-4
Mar 23, 2026
Merged

Support target upgrade version in update-codeql.yml workflow#160
data-douser merged 2 commits intomainfrom
dd/release-prep/v2-24-4

Conversation

@data-douser
Copy link
Copy Markdown
Collaborator

This pull request enhances the update-codeql.yml GitHub 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:

  • Added a new target_version input to the workflow, allowing users to specify a desired CodeQL CLI version when manually triggering the workflow. (.github/workflows/update-codeql.yml)
  • Updated the job logic to use the specified target_version if provided, including validation to ensure the version exists in the github/codeql-cli-binaries releases. If not provided, the workflow continues to fetch the latest release as before. (.github/workflows/update-codeql.yml)
  • Improved output messages to reflect whether a manual or automatic version is being used, and clarified error handling for missing or invalid versions. (.github/workflows/update-codeql.yml)

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.
@data-douser data-douser self-assigned this Mar 23, 2026
Copilot AI review requested due to automatic review settings March 23, 2026 17:20
@data-douser data-douser added the enhancement New feature or request label Mar 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 23, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_dispatch input (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.

Comment thread .github/workflows/update-codeql.yml
Comment thread .github/workflows/update-codeql.yml Outdated
@data-douser data-douser marked this pull request as ready for review March 23, 2026 18:10
@data-douser data-douser requested a review from enyil as a code owner March 23, 2026 18:10
Copilot AI review requested due to automatic review settings March 23, 2026 18:10
@data-douser data-douser requested a review from a team as a code owner March 23, 2026 18:10
@data-douser data-douser merged commit 504152c into main Mar 23, 2026
9 checks passed
@data-douser data-douser deleted the dd/release-prep/v2-24-4 branch March 23, 2026 18:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_version are 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 to target_version/desired_version (or similar), or emit an additional output alongside latest_version to 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants