Skip to content

Commit 56d659b

Browse files
committed
Add precommit workflow
Signed-off-by: Anish Asthana <[email protected]>
1 parent d7d8cce commit 56d659b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Diff for: .github/workflows/precommit.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Pre-commit
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
tags-ignore:
7+
- 'v*'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
precommit:
13+
runs-on: ubuntu-latest
14+
container:
15+
image: quay.io/opendatahub/pre-commit-go-toolchain:v0.2 # https://github.com/opendatahub-io/data-science-pipelines-operator/blob/main/.github
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Activate cache
20+
uses: actions/cache@v2
21+
with:
22+
path: /cache
23+
key: ${{ runner.os }}-cache-${{ hashFiles('**/go.sum', '.pre-commit-config.yaml') }}
24+
25+
- name: Run pre-commit checks
26+
run: pre-commit run --all-files

0 commit comments

Comments
 (0)