mirror of
https://github.com/trapd00r/LS_COLORS.git
synced 2024-11-16 16:48:28 +01:00
Add github action for pre-commit checks
This commit is contained in:
parent
4e1b1ac1c6
commit
b47f8fb264
2 changed files with 29 additions and 1 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -1,4 +1,6 @@
|
|||
---
|
||||
name: 'Release'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
@ -8,7 +10,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Check out Git repository'
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 'Generate shell files'
|
||||
run: make generate
|
||||
|
|
26
.github/workflows/pre_commit.yaml
vendored
Normal file
26
.github/workflows/pre_commit.yaml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
name: pre-commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install pre-commit
|
||||
run: pip install pre-commit
|
||||
|
||||
- name: cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
key: pre-commit-dot-cache-{{ checksum ".pre-commit-config.yaml" }}
|
||||
path: ~/.cache/pre-commit
|
||||
|
||||
- name: Pre-commit checks
|
||||
run: pre-commit run --all-files --show-diff-on-failure
|
Loading…
Reference in a new issue