forked from opencepk/opencepk-template-base
-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (33 loc) · 905 Bytes
/
pre-commit.yml
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
---
name: pre-commit
on:
pull_request:
push:
branches:
- main
permissions: read-all
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all history so that the pre-commit hooks can work properly
- name: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup SSH Agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY_ICE_MODULES_READONLY }}
- name: pre-commit-hook-skip-if-template-repo
run: |
if [[ -f .pre-commit-template-skip-hooks.sh ]];then
source .pre-commit-template-skip-hooks.sh
fi
- name: pre-commit-run
uses: pre-commit/[email protected]
env:
SKIP: ${{ env.SKIP }}