Skip to content

Commit

Permalink
feat: build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 6, 2022
1 parent 31721d7 commit 5866f83
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ jobs:

Change these options in the workflow `.yml` file to meet your GitHub project needs:

| Setting | Description | Recommended value |
| ------------------ | -------------------------------------------------------------------------------------- | ------------------------------------- |
| `api-token` | [Account API token](https://docs.codacy.com/codacy-api/api-tokens/#account-api-tokens) | `${{ secrets.CODACY_API_TOKEN }}` |
| `project-token` | [Project API token](https://docs.codacy.com/codacy-api/api-tokens/#project-api-tokens) | `${{ secrets.CODACY_PROJECT_TOKEN }}` |
| `coverage-reports` | Optional comma-separated list of reports to send | `''` |
| Setting | Description | Recommended value |
| --------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------- |
| `api-token` | [Account API token](https://docs.codacy.com/codacy-api/api-tokens/#account-api-tokens) | `${{ secrets.CODACY_API_TOKEN }}` |
| `project-token` | [Project API token](https://docs.codacy.com/codacy-api/api-tokens/#project-api-tokens) | `${{ secrets.CODACY_PROJECT_TOKEN }}` |
| `coverage-reports` | Optional comma-separated list of reports to send | `''` |
| `force-coverage-parser` | Optionally force using a specific coverage report parser | `''` |
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ inputs:
description: 'Optional comma separated list of coverage reports to send to Codacy'
required: false
default: ''
force-coverage-parser:
description: 'Optionally force using a specific coverage report parser'
required: false
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -47,6 +50,7 @@ runs:
auth=''
if [ -n "${{ inputs.api-token }}" ]; then auth="--api-token ${{ inputs.api-token }} --organization-provider $ORGANIZATION_PROVIDER --username $OWNER_NAME --project-name $REPOSITORY_NAME"; fi
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
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) report $auth $params --partial &&\
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) report $force_parser $auth $params --partial &&\
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) final $auth

0 comments on commit 5866f83

Please sign in to comment.