GeezerVison is showing github.com — Add support for adding `setup-dotnet` steps to `sync.sh` · github/codeql-action@f20e021
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/__local-bundle.yml +14Lines changed: 14 additions & 0 deletions Collapse file
Copy file name to clipboardExpand all lines: pr-checks/checks/local-bundle.yml +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -3,6 +3,7 @@ description: "Tests using a CodeQL bundle from a local file rather than a URL" |
3 | 3 | versions: ["linked"] |
4 | 4 | installGo: true |
5 | 5 | installPython: true |
| 6 | +installDotNet: true |
6 | 7 | steps: |
7 | 8 | - name: Fetch latest CodeQL bundle |
8 | 9 | run: | |
|
Collapse file
Copy file name to clipboardExpand all lines: pr-checks/sync.py +19Lines changed: 19 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -204,6 +204,25 @@ def writeHeader(checkStream): |
204 | 204 | } |
205 | 205 | }) |
206 | 206 |
|
| 207 | + installDotNet = is_truthy(checkSpecification.get('installDotNet', '')) |
| 208 | + |
| 209 | + if installDotNet: |
| 210 | + baseDotNetVersionExpr = '9.x' |
| 211 | + workflowInputs['dotnet-version'] = { |
| 212 | + 'type': 'string', |
| 213 | + 'description': 'The version of .NET to install', |
| 214 | + 'required': False, |
| 215 | + 'default': baseDotNetVersionExpr, |
| 216 | + } |
| 217 | + |
| 218 | + steps.append({ |
| 219 | + 'name': 'Install .NET', |
| 220 | + 'uses': 'actions/setup-dotnet@v5', |
| 221 | + 'with': { |
| 222 | + 'dotnet-version': '${{ inputs.dotnet-version || \'' + baseDotNetVersionExpr + '\' }}' |
| 223 | + } |
| 224 | + }) |
| 225 | + |
207 | 226 | # If container initialisation steps are present in the check specification, |
208 | 227 | # make sure to execute them first. |
209 | 228 | if 'container' in checkSpecification and 'container-init-steps' in checkSpecification: |
|