claude-memory-mcp/.github/workflows/ci.yml.disabled
Viktor Barzin 516d08f43a [ci] Switch build to Woodpecker dual-push (DockerHub + Forgejo)
Phase 1 of the registry consolidation rolling out across the homelab —
infra/docs/plans/2026-05-07-forgejo-registry-consolidation-plan.md.

* New .woodpecker/build.yml runs the test suite, then dual-pushes to
  viktorbarzin/claude-memory-mcp on DockerHub AND
  forgejo.viktorbarzin.me/viktor/claude-memory-mcp.
* GHA ci.yml renamed to .disabled — its build job would otherwise
  race the Woodpecker build and clobber Forgejo with a stale image.
  Re-enable only on rollback.
* DockerHub remains the canonical pull source until Phase 3 flips
  infra/stacks/claude-memory/main.tf image= to Forgejo. Phase 3 also
  archives this GitHub repo and CLAUDE.md is updated to point
  `claude plugins install` at the Forgejo URL.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 15:58:55 +00:00

73 lines
2.3 KiB
Text

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
IMAGE_NAME: claude-memory-mcp
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e ".[api,dev]"
- run: ruff check src/ tests/
- run: mypy src/claude_memory/
- run: pytest tests/ -v --tb=short
build:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
outputs:
image_tag: ${{ steps.meta.outputs.sha }}
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: meta
run: echo "sha=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT
- uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
push: true
platforms: linux/amd64
tags: |
viktorbarzin/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.sha }}
viktorbarzin/${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Trigger Woodpecker deploy
run: |
for attempt in 1 2 3; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST \
"https://ci.viktorbarzin.me/api/repos/78/pipelines" \
-H "Authorization: Bearer ${{ secrets.WOODPECKER_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{"branch":"main","variables":{"IMAGE_TAG":"${{ needs.build.outputs.image_tag }}","IMAGE_NAME":"viktorbarzin/${{ env.IMAGE_NAME }}"}}')
if [ "$STATUS" -ge 200 ] && [ "$STATUS" -lt 300 ]; then
echo "Woodpecker deploy triggered (HTTP $STATUS)"
exit 0
fi
echo "Attempt $attempt failed (HTTP $STATUS), retrying in 30s..."
sleep 30
done
echo "Failed to trigger Woodpecker deploy after 3 attempts"
exit 1