Skip to content

Commit

Permalink
Merge pull request #292 from netlify/chore/actions-verify-go
Browse files Browse the repository at this point in the history
chore(actions): check uncomitted go source code changes
  • Loading branch information
JGAntunes authored Jan 21, 2021
2 parents a128ec2 + 08798c8 commit a89cbcc
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/verify-go-src.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Verify Go client

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
verify-go:
name: Verify go client source code is up to date
strategy:
matrix:
os: [ubuntu-latest]
go_version: [1.14.x]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go ${{ matrix.go }}
uses: actions/[email protected]
with:
go-version: ${{ matrix.go_version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: make all
- name: Check for changes
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the go client source files detected"
else
echo "Changes to the go client source files detected, please run 'make all' and push your changes"
exit 1
fi
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ vendor
yarn.lock
dist
.vscode
.gobincache
.gobincache
swagger_flat.json
swagger_go.json

0 comments on commit a89cbcc

Please sign in to comment.