Action.yml improvements

This commit is contained in:
Joachim Jablon
2021-09-26 11:39:35 +02:00
parent 00412ba2c2
commit 98631d4c18

View File

@@ -1,41 +1,52 @@
name: 'Coverage' name: Coverage Comment
description: > description: >
Publish diff coverage report as PR comment, and create a coverage badge Publish diff coverage report as PR comment, and create a coverage badge
to display on the readme. to display on the readme.
inputs: inputs:
GITHUB_TOKEN: GITHUB_TOKEN:
description: A GitHub token to write comments and write the badge to the wiki. description: >
A GitHub token to write comments and write the badge to the wiki
(``${{ github.token }}``)
required: true required: true
COVERAGE_FILE: COVERAGE_FILE:
description: Path and filename of the coverage XML file to analyze. description: >
Path and filename of the coverage XML file to analyze.
default: "coverage.xml" default: "coverage.xml"
required: false required: false
COMMENT_TEMPLATE: COMMENT_TEMPLATE:
description: > description: >
Specify a different template for the comments that will be written on the PR. [Advanced] Specify a different template for the comments that will be written on the PR.
required: false required: false
DIFF_COVER_ARGS: DIFF_COVER_ARGS:
description: Additional args to pass to diff cover (one per line) description: >
[Advanced] Additional args to pass to diff cover (one per line)
required: false required: false
BADGE_ENABLED: BADGE_ENABLED:
description: Whether or not a badge will be generated and stored. description: >
Whether or not a badge will be generated and stored.
default: "true" default: "true"
required: false required: false
BADGE_FILENAME: BADGE_FILENAME:
description: Name of the json file containing badge informations stored in the repo wiki description: >
Name of the json file containing badge informations stored in the repo
wiki.
default: coverage-comment-badge.json default: coverage-comment-badge.json
required: false required: false
MINIMUM_GREEN: MINIMUM_GREEN:
description: description: >
If the coverage percentage is above or equal to this value, the badge
will be green.
default: 100 default: 100
required: false required: false
MINIMUM_ORANGE: MINIMUM_ORANGE:
description: description: >
If the coverage percentage is not green and above or equal to this value,
the badge will be orange. Otherwise it will be red.
default: 70 default: 70
required: false required: false
runs: runs:
using: 'docker' using: docker
image: 'Dockerfile' image: Dockerfile
env: env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
COVERAGE_FILE: ${{ inputs.COVERAGE_FILE }} COVERAGE_FILE: ${{ inputs.COVERAGE_FILE }}