From 8f88d56b86ab79da69f2629d6fc5e284f6588953 Mon Sep 17 00:00:00 2001 From: Marcos Martins Date: Wed, 22 May 2024 09:42:00 -0300 Subject: [PATCH] ci: skip 'update-cli-screenshots' if no changes --- .github/workflows/docspublish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docspublish.yml b/.github/workflows/docspublish.yml index 4ac9a3a4a4..f318b86858 100644 --- a/.github/workflows/docspublish.yml +++ b/.github/workflows/docspublish.yml @@ -30,8 +30,13 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" git add docs/images/cli_help - git commit -m "docs(cli/screenshots): update CLI screenshots" -m "[skip ci]" - git push + + if [[ -n "$(git status --porcelain)" ]]; then + git commit -m "docs(cli/screenshots): update CLI screenshots" -m "[skip ci]" + git push + else + echo "No changes to commit. Skipping." + fi publish-documentation: runs-on: ubuntu-latest