fix(ci): use setup-go built-in cache, remove go-hashfiles and actions/cache from Go builds
CI / server-core-test (push) Has been skipped
CI / device-agent-test (push) Has been skipped
CI / dashboard-test (push) Has been skipped
CI / build-server-core (push) Successful in 3m34s
CI / build-device-agent (push) Successful in 2m20s
CI / build-dashboard (push) Successful in 1m34s
CI / build-docs (push) Successful in 51s
CI / release (push) Successful in 26s
CI / server-core-test (push) Has been skipped
CI / device-agent-test (push) Has been skipped
CI / dashboard-test (push) Has been skipped
CI / build-server-core (push) Successful in 3m34s
CI / build-device-agent (push) Successful in 2m20s
CI / build-dashboard (push) Successful in 1m34s
CI / build-docs (push) Successful in 51s
CI / release (push) Successful in 26s
This commit is contained in:
@@ -22,23 +22,7 @@ jobs:
|
|||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
cache: false
|
cache: true
|
||||||
|
|
||||||
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
|
||||||
id: hash-go
|
|
||||||
with:
|
|
||||||
patterns: |
|
|
||||||
apps/device-agent/go.mod
|
|
||||||
apps/device-agent/go.sum
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
/toolcache/go
|
|
||||||
/root/go/pkg/mod
|
|
||||||
/root/.cache/go-build
|
|
||||||
key: go-device-agent-${{ steps.hash-go.outputs.hash }}
|
|
||||||
restore-keys: go-device-agent-
|
|
||||||
|
|
||||||
- name: Build all platforms
|
- name: Build all platforms
|
||||||
working-directory: apps/device-agent
|
working-directory: apps/device-agent
|
||||||
|
|||||||
@@ -22,27 +22,7 @@ jobs:
|
|||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
cache: false
|
cache: true
|
||||||
|
|
||||||
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
|
||||||
id: hash-go
|
|
||||||
with:
|
|
||||||
patterns: |
|
|
||||||
apps/server-core/go.mod
|
|
||||||
apps/server-core/go.sum
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
/toolcache/go
|
|
||||||
/root/go/pkg/mod
|
|
||||||
/root/.cache/go-build
|
|
||||||
key: go-server-core-${{ steps.hash-go.outputs.hash }}
|
|
||||||
restore-keys: go-server-core-
|
|
||||||
|
|
||||||
- name: Download Go modules
|
|
||||||
working-directory: apps/server-core
|
|
||||||
run: go mod download
|
|
||||||
|
|
||||||
- name: Generate Swagger docs
|
- name: Generate Swagger docs
|
||||||
working-directory: apps/server-core
|
working-directory: apps/server-core
|
||||||
|
|||||||
Reference in New Issue
Block a user