Skip to content

Commit ec2a714

Browse files
add warning option for no connectors
1 parent 691da72 commit ec2a714

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

action.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ inputs:
3030
"notice" to warn on the Actions page,
3131
or "error" to fail the workflow step.
3232
default: "unset"
33+
warning-no-connectors:
34+
required: false
35+
description: |
36+
Set to "skip" to skip to the next mapping file,
37+
"notice" to warn on the Actions page,
38+
or "error" to fail the workflow step.
39+
default: "unset"
3340
warning-dupe:
3441
required: false
3542
description: |
@@ -69,6 +76,7 @@ runs:
6976
WARNINGS: ${{ inputs.warnings }}
7077
WARNING_NO_CID: ${{ inputs.warning-no-cid }}
7178
WARNING_NO_IMAGE: ${{ inputs.warning-no-image }}
79+
WARNING_NO_CONNECTORS: ${{ inputs.warning-no-connectors }}
7280
WARNING_DUPE: ${{ inputs.warning-dupe }}
7381
COLS: ${{ inputs.columns }}
7482
PRINT_COLS: ${{ inputs.print-columns }}

main.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
# skip if "skip"
77
# env WARNING_NO_CID
88
# env WARNING_NO_IMAGE
9+
# env WARNING_NO_CONNECTORS
910
# env WARNING_DUPE
1011
# same options as WARNINGS
1112

1213
if [ "$DEBUG" = "true" ]; then
1314
echo "WARNINGS: $WARNINGS"
1415
echo "WARNING_NO_CID: $WARNING_NO_CID"
1516
echo "WARNING_NO_IMAGE: $WARNING_NO_IMAGE"
17+
echo "WARNING_NO_CONNECTORS: $WARNING_NO_CONNECTORS"
18+
echo "WARNING_DUPE: $WARNING_DUPE"
1619
fi
1720

1821
SCRIPTDIR=$(dirname "$0")
@@ -42,7 +45,7 @@ if [ "$DEBUG" = "true" ]; then
4245
fi
4346
4447
if [ $(echo -n "$CONNECTORS" | wc -l) -eq 0 ]; then
45-
echo "No connectors found"
48+
handle_warning "$WARNING_NO_CONNECTORS" "WARNING: No connectors found"
4649
exit
4750
fi
4851

0 commit comments

Comments
 (0)