Skip to content

Commit 1cb9bf4

Browse files
committed
add flags
1 parent 48bb5e4 commit 1cb9bf4

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ inputs:
88
file:
99
description: 'Path to coverage file to upload'
1010
required: false
11+
flags:
12+
description: 'Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)'
13+
required: false
1114
branding:
1215
color: 'red'
1316
icon: 'umbrella'
@@ -17,3 +20,4 @@ runs:
1720
args:
1821
- ${{ inputs.token }}
1922
- ${{ inputs.file }}
23+
- ${{ inputs.flags }}

entrypoint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ set -eu
55
if [ $# -eq 0 ]
66
then
77
bash <(curl -s https://codecov.io/bash)
8+
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
9+
then
10+
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS
811
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
912
then
1013
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE
14+
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
15+
then
16+
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -F $INPUT_FLAGS
17+
elif [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_FILE" != "x" ]
18+
then
19+
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS -f $INPUT_FILE
1120
elif [ "x$INPUT_TOKEN" != "x" ]
1221
then
1322
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN
1423
elif [ "x$INPUT_FILE" != "x" ]
1524
then
1625
bash <(curl -s https://codecov.io/bash) -f $INPUT_FILE
26+
elif [ "x$INPUT_FLAGS" != "x" ]
27+
then
28+
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS
1729
fi
1830

0 commit comments

Comments
 (0)