mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
check gpg only when skip-validation = false (#1894)
This commit is contained in:
11
action.yml
11
action.yml
@@ -180,13 +180,20 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
missing_deps=""
|
missing_deps=""
|
||||||
|
|
||||||
# Check for required commands
|
# Check for always-required commands
|
||||||
for cmd in bash git curl gpg; do
|
for cmd in bash git curl; do
|
||||||
if ! command -v "$cmd" >/dev/null 2>&1; then
|
if ! command -v "$cmd" >/dev/null 2>&1; then
|
||||||
missing_deps="$missing_deps $cmd"
|
missing_deps="$missing_deps $cmd"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Check for gpg only if validation is not being skipped
|
||||||
|
if [ "${{ inputs.skip_validation }}" != "true" ]; then
|
||||||
|
if ! command -v gpg >/dev/null 2>&1; then
|
||||||
|
missing_deps="$missing_deps gpg"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Report missing required dependencies
|
# Report missing required dependencies
|
||||||
if [ -n "$missing_deps" ]; then
|
if [ -n "$missing_deps" ]; then
|
||||||
echo "Error: The following required dependencies are missing:$missing_deps"
|
echo "Error: The following required dependencies are missing:$missing_deps"
|
||||||
|
|||||||
Reference in New Issue
Block a user