-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.05 KB
/
pre-commit.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
name: Run pre-commit hooks
on: # yamllint disable-line rule:truthy
pull_request: # run when PR opened
push:
branches-ignore: # don't run once PR into main approved
- main
workflow_dispatch:
permissions:
contents: read
jobs:
run-hooks:
name: Run pre-commit hooks
runs-on: ubuntu-latest
steps:
- name: Checkout Repo 🛒
uses: actions/checkout@v4
- name: Set Up Python 🐍
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install pre-commit 📦
run: |
pip install --upgrade pip
pip install --upgrade pre-commit
- name: Run pre-commit hooks ✅
run: pre-commit run --all-files --show-diff-on-failure --hook-stage=manual
# linting multiple dockerfiles: https://github.com/hadolint/hadolint-action/issues/3
- name: Lint Dockerfile ✅
uses: hadolint/[email protected]
with:
dockerfile: "Dockerfile"
recursive: true
# env:
# HADOLINT_RECURSIVE: "true"