2 Commits

Author SHA1 Message Date
Iain Sproat 11d6caebcb Validate inputs are set (#12) 2023-10-16 11:08:42 +01:00
Gergő Jedlicska 4d68562f25 fix checking logic 2023-09-22 13:44:34 +02:00
+24 -1
View File
@@ -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: |
@@ -66,7 +89,7 @@ runs:
run: |
set +e
docker manifest inspect ${{ env.automateHost }}/${{ inputs.speckle_function_id }}:${{ env.releaseTag }}
if [[ $? == 1 ]]
if [[ $? == 0 ]]
then
echo "Cannot override the existing release tag ${{ env.releaseTag }}. Please publish a new release!"
exit 1