From c4050eb2d1fa7f4def1f93c9df1de10baaa89061 Mon Sep 17 00:00:00 2001 From: addetz <43963729+addetz@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:10:09 +0100 Subject: [PATCH] docs: adjust script to handle zero unused images DOC-1232 --- .github/workflows/clean-up-unused-images.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clean-up-unused-images.yaml b/.github/workflows/clean-up-unused-images.yaml index 3b031244ea..cc13a2e495 100644 --- a/.github/workflows/clean-up-unused-images.yaml +++ b/.github/workflows/clean-up-unused-images.yaml @@ -5,6 +5,8 @@ on: # On the first of every month at 2 am - cron: '0 2 1 * *' workflow_dispatch: + push: + branches: ['handle-zero-images-doc-1232'] concurrency: group: clean-up-images-${{ github.ref }} @@ -49,8 +51,8 @@ jobs: - name: Create PR with unused images run: | - unused_image_count=$(wc -l < unused_images.json) - if unused_image_count == 0; then + unused_image_count=$(wc -l < "unused_images.json") + if $unused_image_count == 0; then "No images found to remove." exit 0 fi