-
Notifications
You must be signed in to change notification settings - Fork 19
53 lines (46 loc) · 1.53 KB
/
pr.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
41
42
43
44
45
46
47
48
49
50
51
52
53
---
name: PR
on:
pull_request:
jobs:
LintAndBuild:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.22.x']
steps:
- name: Check conventional commits in PR
uses: Namchee/[email protected]
with:
access_token: ${{ secrets.github_token }}
close: false
strict: false
title_pattern: '([fix|enh|feat|ci|chore|docs\-]+)(\([\w\-]+\))?!?: [A-Z][\w\s:\-]+'
commit_pattern: '([fix|enh|feat|ci|chore|docs\-]+)(\([\w\-]+\))?!?: [A-Z][\w\s:\-]+'
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Lint
uses: reviewdog/[email protected]
with:
github_token: ${{ secrets.github_token }}
golangci_lint_flags: "--config=.golangci.yml"
fail_on_error: true
- name: Setup env
run: |
echo "GOPATH=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV
echo "$(dirname $GITHUB_WORKSPACE)/bin" >> $GITHUB_PATH
mkdir -p "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel"
ln -sf "$GITHUB_WORKSPACE/" "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox"
shell: bash
- name: Go installation
uses: actions/[email protected]
with:
go-version: ${{ matrix.go }}
- name: Build
run: |
cd "$(dirname $GITHUB_WORKSPACE)/src/github.com/smutel/terraform-provider-netbox"
make build
shell: bash