mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -06:00
Chore: Add github action to check go module updates (#84936)
This commit is contained in:
parent
154868e624
commit
d4e6b325bf
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@ -694,6 +694,7 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/feature-toggle-cleanup.yml @tolzhabayev
|
||||
/.github/workflows/scripts/feature-toggle-cleanup/feature-toggle-cleanup.js @tolzhabayev
|
||||
/.github/workflows/pr-go-workspace-check.yml @grafana/grafana-app-platform-squad
|
||||
|
||||
# Generated files not requiring owner approval
|
||||
/packages/grafana-data/src/types/featureToggles.gen.ts @grafanabot
|
||||
|
47
.github/workflows/pr-go-workspace-check.yml
vendored
Normal file
47
.github/workflows/pr-go-workspace-check.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
name: "Go Workspace Check"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '**/go.work'
|
||||
- '**/go.work.sum'
|
||||
- '**/go.mod'
|
||||
- '**/go.sum'
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Go Workspace Check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21.8'
|
||||
|
||||
- name: Workspace Sync
|
||||
run: go work sync
|
||||
|
||||
- name: Check for go mod & workspace changes
|
||||
run: |
|
||||
if ! git diff --exit-code --quiet; then
|
||||
echo "Changes detected. Please run 'go work sync' and commit the changes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: make build-go
|
||||
|
||||
- name: Check for go workspace changes
|
||||
run: |
|
||||
if ! git diff --exit-code --quiet; then
|
||||
echo "Changes detected. Please run 'make build-go' and commit the changes."
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user