Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d58b01641 | |||
| 4e19c371d0 | |||
| aa620dec6a |
@@ -35,9 +35,18 @@ jobs:
|
|||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
id: cache-build
|
id: cache-build
|
||||||
with:
|
with:
|
||||||
path: apps/server-core/bin
|
path: |
|
||||||
|
apps/server-core/bin
|
||||||
|
apps/server-core/docs
|
||||||
key: build-server-core-${{ steps.hash-src.outputs.hash }}
|
key: build-server-core-${{ steps.hash-src.outputs.hash }}
|
||||||
|
|
||||||
|
- name: Generate Swagger docs
|
||||||
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
|
working-directory: apps/server-core
|
||||||
|
run: |
|
||||||
|
go install github.com/swaggo/swag/cmd/swag@v1.16.6
|
||||||
|
swag init -g main.go --parseDependency --parseInternal
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
working-directory: apps/server-core
|
working-directory: apps/server-core
|
||||||
|
|||||||
+12
-8
@@ -76,40 +76,44 @@ jobs:
|
|||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
# BUILD — dev/beta/release tags (skip test tags)
|
# BUILD — after tests pass (release) or directly (dev/beta)
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
build-server-core:
|
build-server-core:
|
||||||
if: "!contains(gitea.ref_name, 'test')"
|
if: always() && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
||||||
|
needs: [server-core-test, device-agent-test, dashboard-test]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
uses: ./.gitea/workflows/build_server_core.yaml
|
uses: ./.gitea/workflows/build_server_core.yaml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build-device-agent:
|
build-device-agent:
|
||||||
if: "!contains(gitea.ref_name, 'test')"
|
if: always() && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
||||||
|
needs: [server-core-test, device-agent-test, dashboard-test]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
uses: ./.gitea/workflows/build_device_agent.yaml
|
uses: ./.gitea/workflows/build_device_agent.yaml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build-dashboard:
|
build-dashboard:
|
||||||
if: "!contains(gitea.ref_name, 'test')"
|
if: always() && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
||||||
|
needs: [server-core-test, device-agent-test, dashboard-test]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
uses: ./.gitea/workflows/build_dashboard.yaml
|
uses: ./.gitea/workflows/build_dashboard.yaml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
# DOCS — release tags only (skip dev/beta/test)
|
# DOCS — after builds pass, release tags only
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
build-docs:
|
build-docs:
|
||||||
if: "!contains(gitea.ref_name, 'dev') && !contains(gitea.ref_name, 'beta') && !contains(gitea.ref_name, 'test')"
|
if: always() && !contains(gitea.ref_name, 'dev') && !contains(gitea.ref_name, 'beta') && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
||||||
|
needs: [build-server-core, build-device-agent, build-dashboard]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
uses: ./.gitea/workflows/docs_call.yaml
|
uses: ./.gitea/workflows/docs_call.yaml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
# RELEASE — dev/beta/release tags (skip test)
|
# RELEASE — after everything passes
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
release:
|
release:
|
||||||
if: "!contains(gitea.ref_name, 'test') && !failure()"
|
if: always() && !contains(gitea.ref_name, 'test') && !failure() && !cancelled()
|
||||||
needs: [build-server-core, build-device-agent, build-dashboard, build-docs]
|
needs: [build-server-core, build-device-agent, build-dashboard, build-docs]
|
||||||
uses: ./.gitea/workflows/release_call.yaml
|
uses: ./.gitea/workflows/release_call.yaml
|
||||||
with:
|
with:
|
||||||
|
|||||||
+1
-1
Submodule apps/device-agent updated: e64fd34904...084beb5948
Reference in New Issue
Block a user