Skip to content

Commit a89cbcc

Browse files
authored
Merge pull request #292 from netlify/chore/actions-verify-go
chore(actions): check uncomitted go source code changes
2 parents a128ec2 + 08798c8 commit a89cbcc

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/verify-go-src.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Verify Go client
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
verify-go:
11+
name: Verify go client source code is up to date
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
go_version: [1.14.x]
16+
runs-on: ${{ matrix.os }}
17+
steps:
18+
- name: Install Go ${{ matrix.go }}
19+
uses: actions/[email protected]
20+
with:
21+
go-version: ${{ matrix.go_version }}
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
- name: Install dependencies
25+
run: make all
26+
- name: Check for changes
27+
run: |
28+
if [ -z "$(git status --porcelain)" ]; then
29+
echo "No changes to the go client source files detected"
30+
else
31+
echo "Changes to the go client source files detected, please run 'make all' and push your changes"
32+
exit 1
33+
fi

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ vendor
44
yarn.lock
55
dist
66
.vscode
7-
.gobincache
7+
.gobincache
8+
swagger_flat.json
9+
swagger_go.json

0 commit comments

Comments
 (0)