Closed
Description
I believe the conditional handling inside the action could be implemented more concisely by conditionally running steps based in the input instead of always running and checking inside a shell. E.g. instead of
- name: Check if .NET is installed
run: |
if $INPUT_DOTNET_VALIDATION_ENABLED || $INPUT_SUSHI_ENABLED; then
if ! command -v dotnet &> /dev/null
then
echo "dotnet could not be found. Please see actions/setup-dotnet to set it up before running this action."
exit 1
fi
fi
shell: bash
- name: Check if .NET is installed
if: ${{ inputs.DOTNET_VALIDATION_ENABLED || inputs.INPUT_SUSHI_ENABLED }}
run: |
if ! command -v dotnet &> /dev/null
then
echo "dotnet could not be found. Please see actions/setup-dotnet to set it up before running this action."
exit 1
fi
shell: bash
This would show the Check if .NET is installed
step as disabled in the GitHub workflow view.
(As another nit-picky aside: kebab-case for input parameters generally seems more common in GitHub actions)
Metadata
Metadata
Assignees
Labels
No labels