From 63ef2e3da900e4567341cfb539cba0719d371f6f Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Sat, 2 Mar 2024 17:01:53 +0100 Subject: [PATCH] Only push commit on Gradle repository but not forks --- .github/workflows/update-dist.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/update-dist.yml b/.github/workflows/update-dist.yml index 74e6930..8dfe189 100644 --- a/.github/workflows/update-dist.yml +++ b/.github/workflows/update-dist.yml @@ -44,6 +44,9 @@ jobs: # Important: The push event will not trigger any other workflows, see # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs - name: Commit & push changes + # Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch + # it would erroneously update `action/index.js` on their branch (and the pull request) + if: github.repository == 'gradle/wrapper-validation-action' uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: 'Update `action/index.js`'