Skip to content

Commit

Permalink
no newline for do/then in bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf committed Nov 22, 2023
1 parent 1ce7c31 commit 2489a80
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/actions/artifact_upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,16 @@ 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
# 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."
Expand Down

0 comments on commit 2489a80

Please sign in to comment.