mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-26 03:25:35 +00:00
a56520c3c7
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 1 to 2.1.4. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v1...v2.1.4) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
39 lines
815 B
YAML
39 lines
815 B
YAML
name: go generate
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "release-branch/*"
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2.1.4
|
|
with:
|
|
go-version: 1.17
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: check 'go generate' is clean
|
|
run: |
|
|
if [[ "${{github.ref}}" == release-branch/* ]]
|
|
then
|
|
pkgs=$(go list ./... | grep -v dnsfallback)
|
|
else
|
|
pkgs=$(go list ./...)
|
|
fi
|
|
go generate $pkgs
|
|
echo
|
|
echo
|
|
git diff --name-only --exit-code || (echo "The files above need updating. Please run 'go generate'."; exit 1)
|