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:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: apps/server-core
|
||||
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/"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
@@ -24,14 +22,17 @@ jobs:
|
||||
go-version: '1.26'
|
||||
|
||||
- name: Download Go modules
|
||||
working-directory: apps/server-core
|
||||
run: go mod download
|
||||
|
||||
- name: Generate Swagger docs
|
||||
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
|
||||
working-directory: apps/server-core
|
||||
run: go build -o bin/server-core .
|
||||
|
||||
- name: Upload artifact
|
||||
|
||||
Reference in New Issue
Block a user