diff --git a/.gitea/workflows/auto-merge.yml b/.gitea/workflows/auto-merge.yml index ce60b37d..7fb34560 100644 --- a/.gitea/workflows/auto-merge.yml +++ b/.gitea/workflows/auto-merge.yml @@ -1,10 +1,22 @@ -# Placeholder — auto-merge is handled by nexus-merge-bot.sh -# Gitea Actions requires a runner to be registered. -# When a runner is available, this can replace the bot. -name: stub -on: workflow_dispatch +name: Auto-Merge + +on: + pull_request: + types: [labeled] + jobs: - noop: - runs-on: ubuntu-latest + merge: + runs-on: hermes-runner # Must match actual runner label steps: - - run: echo "See nexus-merge-bot.sh" + - name: Checkout + uses: actions/checkout@v4 + + - name: Run merge bot + run: | + #!/bin/bash + echo "Running auto-merge bot..." + ./nexus-merge-bot.sh + if [ $? -ne 0 ]; then + echo "Merge bot failed" + exit 1 + fi diff --git a/.gitea/workflows/ci-health-check.yml b/.gitea/workflows/ci-health-check.yml new file mode 100644 index 00000000..728eb16b --- /dev/null +++ b/.gitea/workflows/ci-health-check.yml @@ -0,0 +1,21 @@ +name: CI Health Check + +on: + schedule: + - cron: "0 */5 * * *" # Every 5 minutes + workflow_dispatch: + +jobs: + check-runners: + runs-on: hermes-runner # Must match actual runner label + steps: + - name: Check runner status + run: | + #!/bin/bash + set -e + echo "Checking CI runner status..." + if ! gitea-runner status --label hermes-runner; then + echo "CRITICAL: No runners available for hermes-runner label" + exit 1 + fi + echo "CI system healthy" diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index babe5c8d..bf1b77e2 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -7,7 +7,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: hermes-runner # Must match actual runner label steps: - name: Checkout uses: actions/checkout@v4 @@ -19,8 +19,14 @@ jobs: username: ${{ secrets.DEPLOY_USER }} key: ${{ secrets.DEPLOY_SSH_KEY }} script: | + #!/bin/bash + set -e cd ~/the-nexus || git clone http://143.198.27.163:3000/Timmy_Foundation/the-nexus.git ~/the-nexus cd ~/the-nexus git fetch origin main git reset --hard origin/main ./deploy.sh main + if [ $? -ne 0 ]; then + echo "Deployment failed" + exit 1 + fi diff --git a/.gitignore b/.gitignore index 2556e45e..769e943d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules/ test-results/ nexus/__pycache__/ tests/__pycache__/ +.aider*