forked from project-codeflare/codeflare-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 931 Bytes
/
precommit.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
name: Pre-commit
on:
push:
branches:
- '**'
tags-ignore:
- 'v*'
pull_request:
workflow_dispatch:
jobs:
precommit:
runs-on: ubuntu-latest
container:
image: quay.io/opendatahub/pre-commit-go-toolchain:v0.2 # https://github.com/opendatahub-io/data-science-pipelines-operator/blob/main/.github
env:
XDG_CACHE_HOME: /cache
GOCACHE: /cache/go-build
GOMODCACHE: /cache/go-mod
PRE_COMMIT_HOME: /cache/pre-commit
volumes:
- /cache
steps:
- uses: actions/checkout@v3
- name: Set Go
uses: actions/setup-go@v3
with:
go-version: v1.19
- name: Activate cache
uses: actions/cache@v3
with:
path: /cache
key: ${{ runner.os }}-cache-${{ hashFiles('**/go.sum', '.pre-commit-config.yaml') }}
- name: Run pre-commit checks
run: pre-commit run --all-files