Previously, using * in branch filters prevented PR CI actions from running on prefixed branches such as release-branch/* because * only matches characters except for forward slashes. In this PR, we remove the branch filter to ensure that Android builds and go mod tidy checks are executed on all PRs, regardless of the target branch. Additionally, these checks will now run on pushes to release-branch/*. Fixes tailscale/corp#25313 Signed-off-by: Nick Khyl <nickk@tailscale.com>
36 lines
768 B
YAML
36 lines
768 B
YAML
name: go mod tidy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "release-branch/*"
|
|
pull_request:
|
|
# all PRs on all branches
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-go-mod-tidy:
|
|
runs-on: [ubuntu-latest]
|
|
timeout-minutes: 8
|
|
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
cache: false
|
|
go-version-file: go.mod
|
|
|
|
- name: Check 'go mod tidy' is clean
|
|
run: |
|
|
./tool/go mod tidy
|
|
echo
|
|
echo
|
|
git diff --name-only --exit-code || (echo "The files above need updating. Please run 'go mod tidy'."; exit 1)
|