Upgrade actions/checkout from v4 to v5#3139
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the actions/checkout action from v4 to v5 in the CodeQL Advanced workflow template. The change updates a single starter workflow file to use the newer version of the checkout action.
Key Changes
- Updated actions/checkout version from v4 to v5 in the CodeQL Advanced starter workflow
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -53,7 +53,7 @@ jobs: | |||
| # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages | |||
| steps: | |||
| - name: Checkout repository | |||
There was a problem hiding this comment.
This PR only updates actions/checkout from v4 to v5 in this single file, but there are 150+ other workflow files across the repository (in ci/, code-scanning/, deployments/, pages/, automation/, and .github/workflows/ directories) that still use actions/checkout@v4. This creates inconsistency across the starter workflows.
For a comprehensive upgrade, all instances should be updated together to maintain consistency. Users copying these starter workflows would encounter mixed versions, which could be confusing. Either all workflows should be updated in this PR, or this should be documented as an intentional phased rollout approach.
| - name: Checkout repository | |
| - name: Checkout repository | |
| # NOTE: This workflow intentionally uses actions/checkout@v5 as part of a phased | |
| # rollout of the new major version. Other workflows in this repository may still | |
| # reference actions/checkout@v4 until they are updated in subsequent changes. |
Pre-requisites
Please note that at this time we are only accepting new starter workflows for Code Scanning. Updates to existing starter workflows are fine.
Tasks
For all workflows, the workflow:
.ymlfile with the language or platform as its filename, in lower, kebab-cased format (for example,docker-image.yml). Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET").GITHUB_TOKENso that the workflow runs successfully.For CI workflows, the workflow:
cidirectory.ci/properties/*.properties.jsonfile (for example,ci/properties/docker-publish.properties.json).pushtobranches: [ $default-branch ]andpull_requesttobranches: [ $default-branch ].releasewithtypes: [ created ].docker-publish.yml).For Code Scanning workflows, the workflow:
code-scanningdirectory.code-scanning/properties/*.properties.jsonfile (for example,code-scanning/properties/codeql.properties.json), with properties set as follows:name: Name of the Code Scanning integration.creator: Name of the organization/user producing the Code Scanning integration.description: Short description of the Code Scanning integration.categories: Array of languages supported by the Code Scanning integration.iconName: Name of the SVG logo representing the Code Scanning integration. This SVG logo must be present in theiconsdirectory.pushtobranches: [ $default-branch, $protected-branches ]andpull_requesttobranches: [ $default-branch ]. We also recommend ascheduletrigger ofcron: $cron-weekly(for example,codeql.yml).Some general notes:
actionsorganization, or