We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03ca0c4 commit e2d5addCopy full SHA for e2d5add
.github/workflows/clean-up-unused-images.yaml
@@ -5,6 +5,8 @@ on:
5
# On the first of every month at 2 am
6
- cron: '0 2 1 * *'
7
workflow_dispatch:
8
+ push:
9
+ branches: ['handle-zero-images-doc-1232']
10
11
concurrency:
12
group: clean-up-images-${{ github.ref }}
@@ -49,10 +51,16 @@ jobs:
49
51
50
52
- name: Create PR with unused images
53
run: |
- unused_image_count=$(wc -l < unused_images.json)
- if unused_image_count == 0; then
54
- "No images found to remove."
55
- exit 0
+ file="unused_images.json"
+ if [[ -f "$file" ]]; then
56
+ unused_image_count=$(wc -l < "$file")
57
+ if [ "$unused_image_count" -eq 0 ]; then
58
+ echo "No images found to remove."
59
+ exit 0
60
+ fi
61
+ else
62
+ echo "File $file not found."
63
+ exit 1
64
fi
65
66
# Ensure that we are on master.
0 commit comments