-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix double triggers of workflows, add spacing to steps (#215)
- Loading branch information
1 parent
4d69931
commit 61d7259
Showing
2 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,38 @@ | ||
name: pre-commit | ||
|
||
on: [push, pull_request] | ||
on: | ||
|
||
# Trigger manually | ||
workflow_dispatch: | ||
|
||
# Trigger on any push to the master | ||
push: | ||
branches: | ||
- master | ||
|
||
# Trigger on any push to a PR that targets master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
|
||
run-all-files: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install pre-commit | ||
run: | | ||
pip install pre-commit | ||
pre-commit install | ||
- name: Run pre-commit | ||
run: | | ||
pre-commit run --all-files |