Skip to content

Commit

Permalink
fix codacy_reporter_version flag values
Browse files Browse the repository at this point in the history
  • Loading branch information
DMarinhoCodacy committed Jan 8, 2024
1 parent 85a21ba commit 820c902
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ runs:
echo "ORGANIZATION_PROVIDER=$(if [[ $GITHUB_SERVER_URL == "https://github.com" ]]; then echo "gh"; else echo "ghe"; fi)" >> $GITHUB_ENV
echo "OWNER_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)" >> $GITHUB_ENV
echo "REPOSITORY_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)" >> $GITHUB_ENV
echo "CODACY_REPORTER_VERSION=$(if [ -n "${{ inputs.coverage-reporter-version }}" ]; then CODACY_REPORTER_VERSION="${{ inputs.coverage-reporter-version }}"; else CODACY_REPORTER_VERSION=""; fi)" >> $GITHUB_ENV
#latest stable
echo "CODACY_REPORTER_VERSION=$(if [ -n "${{ inputs.coverage-reporter-version }}" ]; then CODACY_REPORTER_VERSION="${{ inputs.coverage-reporter-version }}"; fi)" >> $GITHUB_ENV
- name: "Run coverage-reporter"
shell: bash
run: |
Expand All @@ -59,6 +60,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.coverage-reporter-version }}" ]; then CODACY_REPORTER_VERSION="${{ inputs.coverage-reporter-version }}"; else CODACY_REPORTER_VERSION="master"; fi
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) report $lang $force_parser $auth $params --partial &&\
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) final $auth
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/$CODACY_REPORTER_VERSION/get.sh) report $lang $force_parser $auth $params --partial &&\
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/$CODACY_REPORTER_VERSION/get.sh) final $auth

0 comments on commit 820c902

Please sign in to comment.