6bf437ba9f
- Added package.json for project dependencies and scripts. - Created main application structure with App component. - Implemented ScenarioSelector, LiveOrchestrator, and StoryDesigner components. - Added CSS styles for basic layout and responsiveness. - Integrated WebSocket for real-time updates in LiveOrchestrator. - Implemented YAML editor with validation and deployment features in StoryDesigner. - Created utility scripts for plan execution in development. - Added SVG assets for branding and icons.
119 lines
3.7 KiB
YAML
119 lines
3.7 KiB
YAML
name: RC AutoFix (Scheduled)
|
|
|
|
on:
|
|
# Trigger manually via GitHub UI
|
|
workflow_dispatch:
|
|
|
|
# Run daily at 2 AM UTC (9 AM Paris time)
|
|
schedule:
|
|
- cron: '0 2 * * *'
|
|
|
|
jobs:
|
|
rc-autofix:
|
|
runs-on: macos-latest
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Full history for git operations
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install PlatformIO
|
|
run: |
|
|
python -m pip install -U platformio
|
|
|
|
- name: Bootstrap Zacus environment
|
|
working-directory: ./hardware/firmware
|
|
run: |
|
|
source .venv/bin/activate 2>/dev/null || ./tools/dev/bootstrap_local.sh
|
|
|
|
- name: Configure Git (for commits)
|
|
run: |
|
|
git config --local user.email "codex-agent@electronrare.dev"
|
|
git config --local user.name "Codex Script Expert (CI/CD Agent)"
|
|
|
|
- name: Run RC AutoFix with auto-commit
|
|
working-directory: ./hardware/firmware
|
|
env:
|
|
# Enable all auto-fix features
|
|
ZACUS_GIT_AUTOCOMMIT: '1'
|
|
ZACUS_GIT_ALLOW_WRITE: '1'
|
|
ZACUS_GIT_NO_CONFIRM: '1'
|
|
|
|
# Hardware: Allow simulation mode (no physical ESP32/ESP8266)
|
|
ZACUS_REQUIRE_HW: '0'
|
|
|
|
# Skip upload for stability
|
|
ZACUS_SKIP_UPLOAD: '1'
|
|
run: |
|
|
set +e # Don't exit on failure
|
|
|
|
echo "=== RC AutoFix Started (CI/CD mode) ==="
|
|
./tools/dev/zacus.sh rc-autofix
|
|
RC_RESULT=$?
|
|
|
|
echo ""
|
|
echo "=== RC Result: $RC_RESULT ==="
|
|
|
|
# Show latest artifact if available
|
|
if [[ -d "$(./tools/dev/zacus.sh latest 2>/dev/null || echo '')" ]]; then
|
|
ARTIFACT=$(./tools/dev/zacus.sh latest)
|
|
echo "Artifact: $ARTIFACT"
|
|
echo ""
|
|
echo "=== RC AutoFix Log ==="
|
|
cat "$ARTIFACT/rc_autofix.log" 2>/dev/null || echo "(no autofix log)"
|
|
echo ""
|
|
echo "=== Codex Output ==="
|
|
cat "$ARTIFACT/codex_last_message.md" 2>/dev/null | head -30 || echo "(no codex output)"
|
|
fi
|
|
|
|
exit $RC_RESULT
|
|
|
|
- name: Push changes (if any)
|
|
if: success()
|
|
run: |
|
|
branch="$(git rev-parse --abbrev-ref HEAD)"
|
|
if [[ "$branch" == "HEAD" ]]; then
|
|
branch="${GITHUB_REF_NAME:-story-V2}"
|
|
fi
|
|
if git rev-parse "origin/${branch}" >/dev/null 2>&1; then
|
|
ahead_count=$(git rev-list --count "origin/${branch}..HEAD")
|
|
else
|
|
ahead_count=1
|
|
fi
|
|
if [[ "$ahead_count" -eq 0 ]]; then
|
|
echo "No commits to push"
|
|
else
|
|
echo "Pushing ${ahead_count} commit(s) to origin/${branch}"
|
|
git push origin "HEAD:${branch}"
|
|
fi
|
|
|
|
- name: Upload artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: rc-autofix-artifacts
|
|
path: hardware/firmware/artifacts/rc_live/
|
|
retention-days: 30
|
|
|
|
- name: Notify on failure
|
|
if: failure()
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
github.rest.issues.createComment({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
body: '❌ RC AutoFix failed. Check artifacts for details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
|
|
})
|
|
|
|
# Documentation moved to docs/RC_AUTOFIX_CICD.md
|
|
|