From 11d6caebcbb64a3a7b80de8fcea3b95c795aa7e8 Mon Sep 17 00:00:00 2001 From: Iain Sproat <68657+iainsproat@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:08:42 +0100 Subject: [PATCH] Validate inputs are set (#12) --- action.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/action.yml b/action.yml index ff250a6..9adb2a7 100644 --- a/action.yml +++ b/action.yml @@ -33,6 +33,29 @@ runs: using: "composite" steps: - uses: actions/checkout@v3.5.3 # checkout the repository in which this GitHub Action is being used. + - name: Validate inputs + shell: bash + run: | + if [ -z "${{ inputs.speckle_token }}" ]; then + echo "ERROR: speckle_token secret is required" + exit 1 + fi + if [ -z "${{ inputs.speckle_automate_url }}" ]; then + echo "ERROR: speckle_automate_url input value is required" + exit 1 + fi + if [ -z "${{ inputs.speckle_function_id }}" ]; then + echo "ERROR: speckle_function_id input value is required" + exit 1 + fi + if [ -z "${{ inputs.speckle_function_input_schema_file_path }}" ]; then + echo "ERROR: speckle_function_input_schema_file_path input value is required" + exit 1 + fi + if [ -z "${{ inputs.speckle_function_command }}" ]; then + echo "ERROR: speckle_function_command input value is required" + exit 1 + fi - name: Set Version tag shell: bash run: |