Skip to content

Commit

Permalink
Add force-commit-sha input
Browse files Browse the repository at this point in the history
  • Loading branch information
yoanm committed Mar 23, 2024
1 parent cc07688 commit e8bf406
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.yml
Expand Up @@ -21,6 +21,9 @@ inputs:
force-coverage-parser:
description: 'Optionally force using a specific coverage report parser'
required: false
force-commit-sha:
description: 'Optionally force commit associated to the coverage data'
required: false
coverage-reporter-version:
description: 'Optionally force using a specific coverage reporter version'
required: false
Expand Down Expand Up @@ -62,6 +65,7 @@ runs:
if [ -n "${{ inputs.project-token }}" ]; then auth="--project-token ${{ inputs.project-token }}"; fi
if [ -n "${{ inputs.force-coverage-parser }}" ]; then force_parser="--force-coverage-parser ${{ inputs.force-coverage-parser }}"; else force_parser=""; fi
if [ -n "${{ inputs.language }}" ]; then lang="--language ${{ inputs.language }}"; else lang=""; fi
if [ -n '${{ inputs.force-commit-sha }}' ]; then force_commit="--commit-uuid '${{ inputs.force-commit-sha }}'"; else force_commit=""; fi
bash <(curl -Ls https://coverage.codacy.com/get.sh) report $lang $force_parser $auth $params --partial &&\
bash <(curl -Ls https://coverage.codacy.com/get.sh) report $lang $force_parser $force_commit $auth $params --partial &&\
bash <(curl -Ls https://coverage.codacy.com/get.sh) final $auth

0 comments on commit e8bf406

Please sign in to comment.