mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 23:06:36 +08:00
压缩历史至 95081aff
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: Go Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
push:
|
||||
branches:
|
||||
- "dev"
|
||||
- "main"
|
||||
|
||||
jobs:
|
||||
go_build:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25"
|
||||
check-latest: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
go mod download
|
||||
go install github.com/swaggo/swag/cmd/swag@v1.16.6
|
||||
|
||||
- name: Make Swagger
|
||||
run: make swagger
|
||||
|
||||
- name: Diff Files
|
||||
run: |
|
||||
if ! git diff --exit-code; then
|
||||
echo 'Detected unstaged changes after command. Please make swagger locally.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
run: go build main.go
|
||||
Reference in New Issue
Block a user