Skip to content

Commit b0f2ee7

Browse files
authored
Merge pull request #7 from alhankeser/feature/quiet-fail-if-no-files
Check if there are any files and if not, exit quietly
2 parents 810dd25 + 2367c7c commit b0f2ee7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

action.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,18 @@ runs:
187187
echo "required_measure=${required_measure//$'\n'/ }" >> $GITHUB_OUTPUT
188188
echo "required_set=${required_set//$'\n'/ }" >> $GITHUB_OUTPUT
189189
shell: bash
190+
- name: Check Files
191+
id: has_files_check
192+
shell: bash
193+
run: |
194+
if [ "${{ steps.janitor_args.outputs.files }}" == "" ]; then
195+
echo "has_files=false" >> $GITHUB_OUTPUT
196+
else
197+
echo "has_files=true" >> $GITHUB_OUTPUT
198+
fi
190199
- name: Run Looker Janitor
191200
id: looker_janitor
201+
if: ${{ steps.has_files_check.outputs.has_files == 'true' }}
192202
run: |
193203
python looker-janitor/main.py \
194204
--files ${{ steps.janitor_args.outputs.files }} \

0 commit comments

Comments
 (0)