mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2026-04-18 02:55:45 +00:00
SQSCANGHA-46 Replace the Docker action by a composite action
This commit is contained in:
parent
13990a6956
commit
94d4f8ac4a
11 changed files with 155 additions and 154 deletions
38
action.yml
38
action.yml
|
|
@ -4,11 +4,6 @@ description: >
|
|||
branding:
|
||||
icon: check
|
||||
color: green
|
||||
runs:
|
||||
using: docker
|
||||
image: Dockerfile
|
||||
entrypoint: "/entrypoint.sh"
|
||||
post-entrypoint: "/cleanup.sh"
|
||||
inputs:
|
||||
args:
|
||||
description: Additional arguments to the sonar-scanner
|
||||
|
|
@ -16,4 +11,35 @@ inputs:
|
|||
projectBaseDir:
|
||||
description: Set the sonar.projectBaseDir analysis property
|
||||
required: false
|
||||
default: .
|
||||
scannerVersion:
|
||||
description: Version of the Sonar Scanner CLI to use
|
||||
required: false
|
||||
default: 6.2.1.4610
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Sanity checks
|
||||
run: ${GITHUB_ACTION_PATH}/sanity-checks.sh
|
||||
shell: bash
|
||||
env:
|
||||
INPUT_PROJECTBASEDIR: ${{ inputs.projectBaseDir }}
|
||||
- name: Load Sonar Scanner CLI from cache
|
||||
id: sonar-scanner-cli
|
||||
uses: actions/cache@v4.0.2
|
||||
with:
|
||||
path: ${{ runner.temp }}/sonar-scanner-cli-${{ inputs.scannerVersion }}-${{ runner.os }}-${{ runner.arch }}
|
||||
key: sonar-scanner-cli-${{ inputs.scannerVersion }}-${{ runner.os }}-${{ runner.arch }}
|
||||
- name: Install Sonar Scanner CLI
|
||||
if: steps.sonar-scanner-cli.outputs.cache-hit != 'true'
|
||||
run: ${GITHUB_ACTION_PATH}/install-sonar-scanner-cli.sh
|
||||
shell: bash
|
||||
env:
|
||||
INPUT_SCANNERVERSION: ${{ inputs.scannerVersion }}
|
||||
- name: Add SonarScanner CLI to the PATH
|
||||
run: echo "${RUNNER_TEMP}/sonar-scanner-cli-${{ inputs.scannerVersion }}-${{ runner.os }}-${{ runner.arch }}/bin" >> $GITHUB_PATH
|
||||
shell: bash
|
||||
- name: Run SonarScanner
|
||||
run: ${GITHUB_ACTION_PATH}/run-sonar-scanner.sh ${{ inputs.args }}
|
||||
shell: bash
|
||||
env:
|
||||
INPUT_PROJECTBASEDIR: ${{ inputs.projectBaseDir }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue