Skip to content

Commit 608368c

Browse files
committed
ci: skip 'update-cli-screenshots' if no changes
1 parent 86d6aea commit 608368c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/docspublish.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ jobs:
3030
git config --global user.name "github-actions[bot]"
3131
git config --global user.email "github-actions[bot]@users.noreply.github.com"
3232
git add docs/images/cli_help
33-
git commit -m "docs(cli/screenshots): update CLI screenshots" -m "[skip ci]"
34-
git push
33+
34+
if [[ -n "$(git status --porcelain)" ]]; then
35+
git commit -m "docs(cli/screenshots): update CLI screenshots" -m "[skip ci]"
36+
git push
37+
else
38+
echo "No changes to commit. Skipping."
39+
fi
3540
3641
publish-documentation:
3742
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)