2024-03-25 17:47:34 -05:00
|
|
|
name: "Go Workspace Check"
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
name: Go Workspace Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Set go version
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
2024-05-09 14:30:13 -05:00
|
|
|
go-version-file: go.mod
|
2024-03-25 17:47:34 -05:00
|
|
|
|
2024-07-03 11:49:03 -05:00
|
|
|
- name: Update workspace
|
|
|
|
run: make update-workspace
|
2024-03-25 17:47:34 -05:00
|
|
|
|
|
|
|
- name: Check for go mod & workspace changes
|
|
|
|
run: |
|
|
|
|
if ! git diff --exit-code --quiet; then
|
2024-04-02 03:22:24 -05:00
|
|
|
echo "Changes detected:"
|
|
|
|
git diff
|
2024-07-03 11:49:03 -05:00
|
|
|
echo "Please run 'make update-workspace' and commit the changes."
|
2024-05-10 07:59:44 -05:00
|
|
|
echo "If there is a change in enterprise dependencies, please update pkg/extensions/main.go."
|
2024-03-25 17:47:34 -05:00
|
|
|
exit 1
|
2024-08-21 15:25:25 -05:00
|
|
|
fi
|
|
|
|
- name: Ensure Dockerfile contains submodule COPY commands
|
|
|
|
run: ./scripts/go-workspace/validate-dockerfile.sh
|