Skip to content

Commit c217133

Browse files
committed
Prevent repository-internal pull requests from running duplicate tox builds via GitHub Actions; the 'push' event will have already run a build for commits related to them
1 parent 12fed91 commit c217133

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/python-tox.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
on: [pull_request, push]
22
jobs:
33
build:
4+
# Prevent duplicate builds for 'internal' pull requests on existing commits
5+
# Credit: https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012
6+
if: github.event.push || github.event.pull_request.head.repo.full_name != github.repository
47
runs-on: ubuntu-latest
58
steps:
69
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)