Add !xgopilot/** exclusion pattern to all workflow trigger configurations, matching the existing dependabot pattern. This ensures that xgopilot branches only trigger CI checks on pull_request events, eliminating redundant push event triggers. Fixes #1340 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
873 B
YAML
39 lines
873 B
YAML
name: Format Check
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
- "!dependabot/**"
|
|
- "!xgopilot/**"
|
|
pull_request:
|
|
branches: ["**"]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Set up Go
|
|
uses: ./.github/actions/setup-go
|
|
with:
|
|
go-version: "1.24.2"
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
for dir in . runtime; do
|
|
pushd $dir
|
|
if [ -n "$(go fmt ./... | grep -v xgo_autogen.go)" ]; then
|
|
echo "Some files are not properly formatted. Please run 'go fmt ./...'"
|
|
exit 1
|
|
fi
|
|
popd
|
|
done
|
|
echo "All files are properly formatted."
|