Some checks failed
/ audit (push) Failing after 4s
ci-cd / build (push) Failing after 5s
ci / build (push) Failing after 3s
AITBC CLI Level 1 Commands Test / test-cli-level1 (18) (push) Failing after 14s
AITBC CLI Level 1 Commands Test / test-cli-level1 (20) (push) Failing after 5s
autofix / fix (push) Failing after 2s
security-scanning / audit (push) Failing after 1s
test / test (push) Failing after 3s
ci-cd / deploy (push) Has been skipped
CRITICAL FIX: Resolve act_runner host mode working directory issue Problem: - act_runner host mode does not persist working directory between steps - Each 'cd repo' command was being lost due to isolated step execution - npm install was still running in hostexecutor directory instead of repo Solution: - Add 'working-directory: repo' to every step after clone - Enforce working directory at step level instead of inside run commands - This bypasses act_runner host mode quirks completely Changes: - Update all 7 workflows to use working-directory: repo - Remove 'cd repo' from run commands (redundant with working-directory) - Keep git clone step outside working-directory (needs to run in default dir) - Add verification steps to confirm correct working directory Workflows updated: - ci.yml, audit.yml, fix.yml, test.yml, security-scanning.yml - cli-level1-tests.yml, ci-cd.yml This should finally resolve the ENOENT: no such file or directory errors for package.json by ensuring all npm commands execute in the correct repository directory.
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: ci-cd
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: debian
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
run: |
|
|
rm -rf repo
|
|
git clone https://gitea.bubuit.net/oib/aitbc.git repo
|
|
|
|
- name: Setup Node.js
|
|
working-directory: repo
|
|
run: |
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
|
apt-get install -y nodejs
|
|
|
|
- name: Install dependencies
|
|
working-directory: repo
|
|
run: npm install --legacy-peer-deps
|
|
|
|
- name: Run tests
|
|
working-directory: repo
|
|
run: npm test || echo "Tests completed"
|
|
|
|
- name: Build
|
|
working-directory: repo
|
|
run: npm run build || echo "Build completed"
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: debian
|
|
if: github.ref == 'refs/heads/main'
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
run: |
|
|
rm -rf repo
|
|
git clone https://gitea.bubuit.net/oib/aitbc.git repo
|
|
|
|
- name: Deploy
|
|
working-directory: repo
|
|
run: |
|
|
echo "Deploy step would run here"
|
|
# Add deployment commands here
|