forked from opendatahub-io/data-science-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 1.07 KB
/
Copy pathpre-commit.yml
File metadata and controls
40 lines (35 loc) · 1.07 KB
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:
# push:
# branches:
# - master
# pull_request:
# branches:
# - master
# This workflow is disabled in downstream because we require linting upstream.
on: []
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Fetch base branch
run: git fetch origin ${{ github.base_ref || github.ref_name }}
- uses: actions/setup-python@v6
- uses: ./.github/actions/setup-go
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.10
args: --new --new-from-merge-base=origin/${{ github.base_ref || github.ref_name }}
#- uses: pre-commit/action@v3.0.1
# # This is set to only run the golangci-lint pre-commit hooks
# # Remove in a later PR to run all hooks
# with:
# go-version: '>=1.24.2'
# extra_args: golangci-lint --all-files