mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Demonstrate a GitHub Action that runs pre-commit
This commit is contained in:
parent
0b3ebf86a3
commit
a43d8b99fc
1 changed files with 6 additions and 3 deletions
9
.github/workflows/pre-commit.yml
vendored
9
.github/workflows/pre-commit.yml
vendored
|
|
@ -1,13 +1,16 @@
|
||||||
# https://pre-commit.com
|
# https://pre-commit.com
|
||||||
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
|
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
|
||||||
name: pre-commit
|
name: pre-commit
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
jobs:
|
jobs:
|
||||||
pre-commit:
|
pre-commit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@master
|
- uses: actions/setup-python@v1
|
||||||
- run: pip install pre-commit
|
- run: pip install pre-commit
|
||||||
- run: pre-commit --version
|
- run: pre-commit --version
|
||||||
- run: pre-commit install
|
- run: pre-commit install
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue