mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 07:48:17 +08:00
Add support for adding setup-dotnet steps to sync.sh
This commit is contained in:
14
.github/workflows/__local-bundle.yml
generated
vendored
14
.github/workflows/__local-bundle.yml
generated
vendored
@@ -32,6 +32,11 @@ on:
|
||||
description: The version of Python to install
|
||||
required: false
|
||||
default: '3.13'
|
||||
dotnet-version:
|
||||
type: string
|
||||
description: The version of .NET to install
|
||||
required: false
|
||||
default: 9.x
|
||||
workflow_call:
|
||||
inputs:
|
||||
go-version:
|
||||
@@ -44,6 +49,11 @@ on:
|
||||
description: The version of Python to install
|
||||
required: false
|
||||
default: '3.13'
|
||||
dotnet-version:
|
||||
type: string
|
||||
description: The version of .NET to install
|
||||
required: false
|
||||
default: 9.x
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
@@ -85,6 +95,10 @@ jobs:
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: ${{ inputs.python-version || '3.13' }}
|
||||
- name: Install .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
|
||||
- name: Fetch latest CodeQL bundle
|
||||
run: |
|
||||
wget https://github.com/github/codeql-action/releases/latest/download/codeql-bundle-linux64.tar.zst
|
||||
|
||||
@@ -3,6 +3,7 @@ description: "Tests using a CodeQL bundle from a local file rather than a URL"
|
||||
versions: ["linked"]
|
||||
installGo: true
|
||||
installPython: true
|
||||
installDotNet: true
|
||||
steps:
|
||||
- name: Fetch latest CodeQL bundle
|
||||
run: |
|
||||
|
||||
@@ -204,6 +204,25 @@ for file in sorted((this_dir / 'checks').glob('*.yml')):
|
||||
}
|
||||
})
|
||||
|
||||
installDotNet = is_truthy(checkSpecification.get('installDotNet', ''))
|
||||
|
||||
if installDotNet:
|
||||
baseDotNetVersionExpr = '9.x'
|
||||
workflowInputs['dotnet-version'] = {
|
||||
'type': 'string',
|
||||
'description': 'The version of .NET to install',
|
||||
'required': False,
|
||||
'default': baseDotNetVersionExpr,
|
||||
}
|
||||
|
||||
steps.append({
|
||||
'name': 'Install .NET',
|
||||
'uses': 'actions/setup-dotnet@v5',
|
||||
'with': {
|
||||
'dotnet-version': '${{ inputs.dotnet-version || \'' + baseDotNetVersionExpr + '\' }}'
|
||||
}
|
||||
})
|
||||
|
||||
# If container initialisation steps are present in the check specification,
|
||||
# make sure to execute them first.
|
||||
if 'container' in checkSpecification and 'container-init-steps' in checkSpecification:
|
||||
|
||||
Reference in New Issue
Block a user