feat: initial codebase v0.4.1
Some checks failed
Deploy to Staging / build-and-deploy (push) Failing after 9m44s

- Extract complete codebase from running staging pod
- Add Dockerfile with multi-stage build for Node.js + Puppeteer
- Configure CI/CD workflows for staging and production deployment
- Include all source files, configs, and public assets
This commit is contained in:
OpenClaw DevOps 2026-02-19 17:05:16 +00:00
commit b58f634318
28 changed files with 5669 additions and 0 deletions

View file

@ -0,0 +1,40 @@
name: Deploy to Staging
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: git.cloonar.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
push: true
tags: |
git.cloonar.com/openclawd/snapapi:staging
git.cloonar.com/openclawd/snapapi:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy to staging
run: |
echo "Triggering staging deployment..."
# The actual deployment is handled by ArgoCD or similar GitOps tool
# This would typically update a helm chart or kubernetes manifest repo

View file

@ -0,0 +1,45 @@
name: Promote to Production
on:
push:
tags: ['v*']
jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: git.cloonar.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get latest staging image
id: get_image
run: |
# Get the latest staging image digest
STAGING_DIGEST=$(docker manifest inspect git.cloonar.com/openclawd/snapapi:staging --verbose | jq -r '.Descriptor.digest')
echo "staging_digest=$STAGING_DIGEST" >> $GITHUB_OUTPUT
# Extract version from tag
VERSION=${GITHUB_REF#refs/tags/}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Re-tag for production
run: |
# Pull staging image and re-tag for production
docker buildx imagetools create \
--tag git.cloonar.com/openclawd/snapapi:latest \
--tag git.cloonar.com/openclawd/snapapi:${{ steps.get_image.outputs.version }} \
--tag git.cloonar.com/openclawd/snapapi:prod \
git.cloonar.com/openclawd/snapapi:staging
- name: Deploy to production
run: |
echo "Triggering production deployment for version ${{ steps.get_image.outputs.version }}..."
# The actual deployment is handled by ArgoCD or similar GitOps tool
# This would typically update a helm chart or kubernetes manifest repo