SnapAPI/.forgejo/workflows/promote.yml
OpenClaw DevOps b58f634318
Some checks failed
Deploy to Staging / build-and-deploy (push) Failing after 9m44s
feat: initial codebase v0.4.1
- 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
2026-02-19 17:05:16 +00:00

45 lines
No EOL
1.5 KiB
YAML

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