From 68c6d6d02c1fafc480f979885ecc42f6fe7475ec Mon Sep 17 00:00:00 2001 From: Ali Khan Date: Mon, 2 Dec 2024 21:29:06 -0500 Subject: [PATCH] skip if readme doesn't change --- .github/workflows/update_readme.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index aeed227..cd708b0 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -36,7 +36,17 @@ jobs: run: | uv run docs/update_readme.py + + - name: Check for changes + id: check_changes + run: | + if git diff --exit-code README.md > /dev/null; then + echo "no_changes=true" >> $GITHUB_ENV + else + echo "no_changes=false" >> $GITHUB_ENV + - name: Commit and push changes + if: env.no_changes == 'false' run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' @@ -45,3 +55,4 @@ jobs: git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +