Skip to content

Commit

Permalink
Use same build condition on all Github workflow
Browse files Browse the repository at this point in the history
And avoid running on push to branch. Currently only master branch
is used and running workflow on both push & pull_request cause
all PRs created from the repository itself (e.g. when a committer
create a PR) to run twice.
  • Loading branch information
PierreF committed Jan 21, 2024
1 parent 869cce2 commit 67737df
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: build
on: [push, pull_request]
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: lint_python
on: [pull_request, push]
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
lint_python:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [master]
push:
workflow_dispatch:
branches: [master]
jobs:
pre-commit:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: tox
on: [push, pull_request]
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
tox:
strategy:
Expand Down

0 comments on commit 67737df

Please sign in to comment.