mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Add github action to check go module updates (#84936)
This commit is contained in:
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/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
|
||||||
/.github/workflows/feature-toggle-cleanup.yml @tolzhabayev
|
/.github/workflows/feature-toggle-cleanup.yml @tolzhabayev
|
||||||
/.github/workflows/scripts/feature-toggle-cleanup/feature-toggle-cleanup.js @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
|
# Generated files not requiring owner approval
|
||||||
/packages/grafana-data/src/types/featureToggles.gen.ts @grafanabot
|
/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
|
||||||
Reference in New Issue
Block a user