From 1371170f138383eb59f46bcc3c88b8f77283f6ed Mon Sep 17 00:00:00 2001 From: miampf Date: Mon, 20 Nov 2023 14:44:38 +0100 Subject: [PATCH] no newline for do/then in bash script --- .github/actions/artifact_upload/action.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/actions/artifact_upload/action.yml b/.github/actions/artifact_upload/action.yml index aa9999a8c10..fd850b3546a 100644 --- a/.github/actions/artifact_upload/action.yml +++ b/.github/actions/artifact_upload/action.yml @@ -36,10 +36,8 @@ runs: # Check if any file matches the given pattern(s). something_exists=false - for pattern in ${{ inputs.path }} - do - if compgen -G $pattern > /dev/null - then + for pattern in ${{ inputs.path }}; do + if compgen -G $pattern > /dev/null; then something_exists=true fi done @@ -47,8 +45,7 @@ runs: # Create an archive if files exist. # Don't create an archive file if no files are found # and warn. - if $something_exists - then + if $something_exists; then zip -e -P '${{ inputs.encryption-secret }}' -qq -r ${{ steps.tempdir.outputs.directory }}/archive.zip ${{ inputs.path }} else echo "::warning:: No files/directories found with the provided path(s) $(echo -n ${{ inputs.path }}). No artifact will be uploaded."