From 29938915a17e2df903a69cdedb1c68aa45304c4c Mon Sep 17 00:00:00 2001 From: Liu Bowen Date: Sun, 17 Dec 2023 15:29:08 +0800 Subject: [PATCH] feat: skip action when artifacts aren't changed --- .github/workflows/languages.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/languages.yaml b/.github/workflows/languages.yaml index f85088d..11c4f9c 100644 --- a/.github/workflows/languages.yaml +++ b/.github/workflows/languages.yaml @@ -51,7 +51,11 @@ jobs: run: | git config user.name 'github-actions[bot]' git config user.email 'github-actions[bot]@users.noreply.github.com' - git add public - git status - git commit -m 'chore(schedule): update metrics' - git push origin main + + # git diff --quiet --exit-code public + if git diff --name-only | grep -q "public/"; then + git add public + git status + git commit -m 'chore(schedule): update metrics' + git push origin main + fi