mirror of
https://github.com/tailscale/tailscale.git
synced 2024-12-01 14:05:39 +00:00
e1309e1323
Updates #5210 Change-Id: I2e950b4776636b4ea89b6566b60e4a87596a3a43 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
39 lines
833 B
YAML
39 lines
833 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@v3
|
|
with:
|
|
go-version: 1.19
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
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 ./... | grep -v dnsfallback)
|
|
fi
|
|
go generate $pkgs
|
|
echo
|
|
echo
|
|
git diff --name-only --exit-code || (echo "The files above need updating. Please run 'go generate'."; exit 1)
|