Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d366c4619 | |||
| dad057528c | |||
| 8ae9149620 | |||
| 9d6c2abb9f | |||
| 4c9e54aaa3 | |||
| 290af48007 | |||
| 9a2212d691 | |||
| 6f57540490 | |||
| 8c1b15a78e | |||
| 52fb2bb5d3 | |||
| 2ce9dbd4e8 | |||
| f85db30c2e | |||
| fc9afd1720 | |||
| c23e0829cd |
@@ -6,6 +6,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
steps:
|
steps:
|
||||||
- name: Configure git auth for submodules
|
- 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/"
|
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||||
@@ -21,6 +23,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '24'
|
node-version: '24'
|
||||||
|
|
||||||
|
- name: Hash package-lock
|
||||||
|
id: hash-npm
|
||||||
|
run: echo "hash=$(sha256sum apps/dashboard-ui/package-lock.json | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.npm
|
||||||
|
key: npm-dashboard-${{ steps.hash-npm.outputs.hash }}
|
||||||
|
restore-keys: npm-dashboard-
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
working-directory: apps/dashboard-ui
|
working-directory: apps/dashboard-ui
|
||||||
run: npm ci || npm install
|
run: npm ci || npm install
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
cross-build:
|
cross-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
steps:
|
steps:
|
||||||
- name: Configure git auth for submodules
|
- 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/"
|
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||||
@@ -20,6 +22,7 @@ jobs:
|
|||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
|
cache: true
|
||||||
|
|
||||||
- name: Build all platforms
|
- name: Build all platforms
|
||||||
working-directory: apps/device-agent
|
working-directory: apps/device-agent
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
steps:
|
steps:
|
||||||
- name: Configure git auth for submodules
|
- 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/"
|
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||||
@@ -20,10 +22,7 @@ jobs:
|
|||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
|
cache: true
|
||||||
- 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
|
||||||
|
|||||||
+16
-11
@@ -10,9 +10,9 @@ on:
|
|||||||
- 'v[0-9]*.[0-9]*.[0-9]'
|
- 'v[0-9]*.[0-9]*.[0-9]'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# --- TESTS (only for test tags) ---
|
# --- TESTS (test tags + stable release tags) ---
|
||||||
server-core-test:
|
server-core-test:
|
||||||
if: contains(gitea.ref_name, 'test')
|
if: contains(gitea.ref_name, 'test') || (!contains(gitea.ref_name, 'dev') && !contains(gitea.ref_name, 'beta'))
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
run: go test $(go list ./... | grep -v internal/firewall) -tags dev -cover -count=1
|
run: go test $(go list ./... | grep -v internal/firewall) -tags dev -cover -count=1
|
||||||
|
|
||||||
device-agent-test:
|
device-agent-test:
|
||||||
if: contains(gitea.ref_name, 'test')
|
if: contains(gitea.ref_name, 'test') || (!contains(gitea.ref_name, 'dev') && !contains(gitea.ref_name, 'beta'))
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
run: go test ./... -cover
|
run: go test ./... -cover
|
||||||
|
|
||||||
dashboard-test:
|
dashboard-test:
|
||||||
if: contains(gitea.ref_name, 'test')
|
if: contains(gitea.ref_name, 'test') || (!contains(gitea.ref_name, 'dev') && !contains(gitea.ref_name, 'beta'))
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -76,35 +76,40 @@ jobs:
|
|||||||
working-directory: apps/dashboard-ui
|
working-directory: apps/dashboard-ui
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
# --- BUILD + RELEASE (only for dev/beta/release tags, no tests needed) ---
|
# --- BUILD + RELEASE (dev/beta/release tags) ---
|
||||||
build-server-core:
|
build-server-core:
|
||||||
if: "!contains(gitea.ref_name, 'test')"
|
if: always() && !contains(gitea.ref_name, 'test') && !failure()
|
||||||
|
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()
|
||||||
|
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()
|
||||||
|
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
|
||||||
|
|
||||||
build-docs:
|
build-docs:
|
||||||
if: "!contains(gitea.ref_name, 'test')"
|
if: always() && !contains(gitea.ref_name, 'test') && !failure()
|
||||||
|
needs: [server-core-test, device-agent-test, dashboard-test]
|
||||||
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:
|
release:
|
||||||
if: "!contains(gitea.ref_name, 'test')"
|
if: always() && !contains(gitea.ref_name, 'test') && !failure()
|
||||||
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:
|
||||||
prerelease: ${{ contains(gitea.ref_name, 'dev-') || contains(gitea.ref_name, 'beta') }}
|
prerelease: ${{ contains(gitea.ref_name, 'dev') }}
|
||||||
|
draft: ${{ contains(gitea.ref_name, 'beta') }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
draft:
|
||||||
|
description: 'Mark as draft'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -65,7 +70,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create release
|
# Create release
|
||||||
JSON_BODY=$(printf '{"tag_name":"%s","name":"%s","body":"Release %s","draft":false,"prerelease":%s}' "$TAG" "$TAG" "$TAG" "${{ inputs.prerelease }}")
|
JSON_BODY=$(printf '{"tag_name":"%s","name":"%s","body":"Release %s","draft":%s,"prerelease":%s}' "$TAG" "$TAG" "$TAG" "${{ inputs.draft }}" "${{ inputs.prerelease }}")
|
||||||
RELEASE_RESP=$(curl -s -X POST \
|
RELEASE_RESP=$(curl -s -X POST \
|
||||||
-H "Authorization: token $TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
|
|||||||
+1
-1
Submodule apps/dashboard-ui updated: 7e59de929f...97d91fdc0d
+1
-1
Submodule apps/device-agent updated: c6241674ce...9d72b3b97d
+1
-1
Submodule apps/server-core updated: b91fcd4c43...c0ad3ef167
Reference in New Issue
Block a user