ci: fix build workflows - remove defaults.run.working-directory
CI / build-server-core (push) Failing after 26s
CI / build-dashboard (push) Failing after 20s
CI / build-docs (push) Failing after 20s
CI / server-core-test (push) Successful in 5m33s
CI / device-agent-test (push) Successful in 1m22s
CI / dashboard-test (push) Successful in 1m5s
CI / build-device-agent (push) Failing after 20s
CI / release (push) Has been skipped
CI / build-server-core (push) Failing after 26s
CI / build-dashboard (push) Failing after 20s
CI / build-docs (push) Failing after 20s
CI / server-core-test (push) Successful in 5m33s
CI / device-agent-test (push) Successful in 1m22s
CI / dashboard-test (push) Successful in 1m5s
CI / build-device-agent (push) Failing after 20s
CI / release (push) Has been skipped
All 4 build jobs failed because defaults.run.working-directory chdir'd into subdirs before checkout created them. - Remove defaults.run.working-directory from all reusable workflows - Add per-step working-directory to run steps that need it - Auth config step runs from repo root (no working-directory)
This commit is contained in:
@@ -6,12 +6,10 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: apps/dashboard-ui
|
|
||||||
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/"
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -24,9 +22,11 @@ jobs:
|
|||||||
node-version: '24'
|
node-version: '24'
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
|
working-directory: apps/dashboard-ui
|
||||||
run: npm ci || npm install
|
run: npm ci || npm install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
working-directory: apps/dashboard-ui
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
|||||||
@@ -13,12 +13,10 @@ jobs:
|
|||||||
exclude:
|
exclude:
|
||||||
- goos: windows
|
- goos: windows
|
||||||
goarch: arm64
|
goarch: arm64
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: apps/device-agent
|
|
||||||
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/"
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -31,6 +29,7 @@ jobs:
|
|||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
working-directory: apps/device-agent
|
||||||
env:
|
env:
|
||||||
CGO_ENABLED: '0'
|
CGO_ENABLED: '0'
|
||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
|
|||||||
@@ -6,12 +6,10 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: apps/server-core
|
|
||||||
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/"
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -24,14 +22,17 @@ jobs:
|
|||||||
go-version: '1.26'
|
go-version: '1.26'
|
||||||
|
|
||||||
- name: Download Go modules
|
- name: Download Go modules
|
||||||
|
working-directory: apps/server-core
|
||||||
run: go mod download
|
run: go mod download
|
||||||
|
|
||||||
- name: Generate Swagger docs
|
- name: Generate Swagger docs
|
||||||
|
working-directory: apps/server-core
|
||||||
run: |
|
run: |
|
||||||
go install github.com/swaggo/swag/cmd/swag@v1.16.6
|
go install github.com/swaggo/swag/cmd/swag@v1.16.6
|
||||||
swag init -g main.go --parseDependency --parseInternal
|
swag init -g main.go --parseDependency --parseInternal
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
working-directory: apps/server-core
|
||||||
run: go build -o bin/server-core .
|
run: go build -o bin/server-core .
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
|||||||
@@ -6,12 +6,10 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: apps/docs
|
|
||||||
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/"
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -24,9 +22,11 @@ jobs:
|
|||||||
node-version: '24'
|
node-version: '24'
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
|
working-directory: apps/docs
|
||||||
run: npm ci || npm install
|
run: npm ci || npm install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
working-directory: apps/docs
|
||||||
run: npm run docs:build
|
run: npm run docs:build
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
|||||||
Reference in New Issue
Block a user