Skip to content

Commit 883b98c

Browse files
committed
Updated action.
1 parent 6bc2aae commit 883b98c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ inputs:
1010
description: 'Output path to write the badge.'
1111
required: true
1212
default: 'coverage.svg'
13+
overwrite:
14+
description: 'Overwrite existing.'
15+
required: true
16+
default: 'true'
1317

1418
runs:
1519
using: 'docker'

entrypoint.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22

33
set -e
44

5-
coverage-badge -o "${INPUT_OUTPUT}" -q
5+
EXTRA_ARGS=""
6+
7+
if [[ $INPUT_OVERWRITE == 'true' ]]; then
8+
EXTRA_ARGS+='-f'
9+
fi
10+
11+
coverage-badge "$EXTRA_ARGS" -o "${INPUT_OUTPUT}"

0 commit comments

Comments
 (0)