-
Notifications
You must be signed in to change notification settings - Fork 488
111 lines (104 loc) · 3.12 KB
/
pr_check_git_status.yml
File metadata and controls
111 lines (104 loc) · 3.12 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: "PR: Check git status"
on:
push:
branches:
- "tlim_testpr"
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
go-fmt:
name: "Check: go fmt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@v6
with:
go-version: stable
- run: go fmt ./...
- uses: CatChen/check-git-status-action@v2
with:
fail-if-not-clean: true
prettier:
name: "Check: prettier"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-node@v6
with:
node-version: lts/*
- run: npm install
- run: node_modules/.bin/prettier --write pkg/js/helpers.js
- run: git checkout -- package-lock.json
- uses: CatChen/check-git-status-action@v2
with:
fail-if-not-clean: true
fmtjson:
name: "Check: fmtjson"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@v6
with:
go-version: stable
- run: go build -o dnscontrol .
- run: bin/fmtjson $(find . -type f -name "*.json" ! -name "package-lock.json" -print)
- uses: CatChen/check-git-status-action@v2
with:
fail-if-not-clean: true
go-mod-tidy:
name: "Check: go mod tidy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@v6
with:
go-version: stable
- run: go mod tidy
- uses: CatChen/check-git-status-action@v2
with:
fail-if-not-clean: true
go-generate:
name: "Check: go generate"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@v6
with:
go-version: stable
- run: go install golang.org/x/tools/cmd/stringer@latest
- run: go generate ./...
- uses: CatChen/check-git-status-action@v2
with:
fail-if-not-clean: true
go-fix:
name: "Check: go fix"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@v6
with:
go-version: stable
- run: go fix ./...
- uses: CatChen/check-git-status-action@v2
with:
fail-if-not-clean: true