ci: add Gitea-compatible caching (RUNNER_TOOL_CACHE + actions/cache@v3 + go-hashfiles)
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 15m18s
CI / build-device-agent (push) Successful in 5m51s
CI / build-docs (push) Successful in 1m13s
CI / build-dashboard (push) Failing after 1m38s
CI / release (push) Has been skipped

Per Gitea tutorial: add RUNNER_TOOL_CACHE=/toolcache env, use actions/cache@v3
(not v4), and go-hashfiles instead of hashFiles() which is unsupported.
This commit is contained in:
datadunia
2026-06-17 14:23:51 +07:00
parent 9a2212d691
commit 290af48007
3 changed files with 49 additions and 0 deletions
+15
View File
@@ -6,6 +6,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Configure git auth for submodules
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
@@ -21,6 +23,19 @@ jobs:
with:
node-version: '24'
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
id: hash-npm
with:
patterns: |
apps/dashboard-ui/package-lock.json
- uses: actions/cache@v3
with:
path: |
~/.npm
key: npm-dashboard-${{ steps.hash-npm.outputs.hash }}
restore-keys: npm-dashboard-
- name: Install
working-directory: apps/dashboard-ui
run: npm ci || npm install
+17
View File
@@ -6,6 +6,8 @@ on:
jobs:
cross-build:
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Configure git auth for submodules
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
@@ -21,6 +23,21 @@ jobs:
with:
go-version: '1.26'
- 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: |
/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
working-directory: apps/device-agent
shell: bash
+17
View File
@@ -6,6 +6,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Configure git auth for submodules
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
@@ -21,6 +23,21 @@ jobs:
with:
go-version: '1.26'
- 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: |
/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