mirror of
https://github.com/gradle/actions
synced 2024-11-23 18:02:13 +00:00
Avoid running workflow on forks
This commit is contained in:
parent
19ff74e0a6
commit
8422a6a674
1 changed files with 3 additions and 3 deletions
6
.github/workflows/ci-update-dist.yml
vendored
6
.github/workflows/ci-update-dist.yml
vendored
|
@ -14,6 +14,9 @@ permissions:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-dist:
|
update-dist:
|
||||||
|
# Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch
|
||||||
|
# it would erroneously update `dist` on their branch (and the pull request)
|
||||||
|
if: github.repository == 'gradle/actions'
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -45,9 +48,6 @@ jobs:
|
||||||
# Important: The push event will not trigger any other workflows, see
|
# 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
|
# 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
|
- name: Commit & push changes
|
||||||
# Only run for the Gradle repository; otherwise when users create pull requests from their `main` branch
|
|
||||||
# it would erroneously update `dist` on their branch (and the pull request)
|
|
||||||
if: github.repository == 'gradle/actions'
|
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: '[bot] Update dist directory'
|
commit_message: '[bot] Update dist directory'
|
||||||
|
|
Loading…
Reference in a new issue