Compare commits
No commits in common. "db0d4eeed2a44590f7d5689796456c57c127fba1" and "e49c4073f82332d0c6f0580352f01b763418d89b" have entirely different histories.
db0d4eeed2
...
e49c4073f8
3 changed files with 57 additions and 57 deletions
|
|
@ -1,44 +1,40 @@
|
|||
name: Build & Deploy to Staging
|
||||
name: Deploy to Staging
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-stage:
|
||||
name: Build & Deploy to Staging
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Forgejo Registry
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.cloonar.com
|
||||
username: openclawd
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
- name: Build and Push
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
no-cache: true
|
||||
tags: |
|
||||
git.cloonar.com/openclawd/snapapi:latest
|
||||
git.cloonar.com/openclawd/snapapi:${{ github.sha }}
|
||||
platforms: linux/arm64
|
||||
- name: Deploy to Staging
|
||||
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: |
|
||||
curl -sLO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
chmod +x kubectl
|
||||
echo "${{ secrets.KUBECONFIG }}" | base64 -d > /tmp/kubeconfig.yaml
|
||||
./kubectl set image deployment/snapapi \
|
||||
snapapi=git.cloonar.com/openclawd/snapapi:${{ github.sha }} \
|
||||
-n snapapi-staging --kubeconfig=/tmp/kubeconfig.yaml
|
||||
./kubectl rollout status deployment/snapapi \
|
||||
-n snapapi-staging --kubeconfig=/tmp/kubeconfig.yaml --timeout=180s
|
||||
echo "✅ Staging deploy complete!"
|
||||
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
|
||||
|
|
@ -6,39 +6,40 @@ on:
|
|||
|
||||
jobs:
|
||||
promote:
|
||||
name: Promote to Production
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Forgejo Registry
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.cloonar.com
|
||||
username: openclawd
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
- name: Build and Push Production
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
no-cache: true
|
||||
tags: |
|
||||
git.cloonar.com/openclawd/snapapi:prod
|
||||
git.cloonar.com/openclawd/snapapi:${{ github.ref_name }}
|
||||
platforms: linux/arm64
|
||||
- name: Deploy to Production
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get latest staging image
|
||||
id: get_image
|
||||
run: |
|
||||
curl -sLO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
chmod +x kubectl
|
||||
echo "${{ secrets.KUBECONFIG }}" | base64 -d > /tmp/kubeconfig.yaml
|
||||
./kubectl set image deployment/snapapi \
|
||||
snapapi=git.cloonar.com/openclawd/snapapi:${{ github.ref_name }} \
|
||||
-n snapapi --kubeconfig=/tmp/kubeconfig.yaml
|
||||
./kubectl rollout status deployment/snapapi \
|
||||
-n snapapi --kubeconfig=/tmp/kubeconfig.yaml --timeout=180s
|
||||
echo "✅ Production deploy complete!"
|
||||
# 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
|
||||
|
|
@ -330,7 +330,7 @@ footer{border-top:1px solid var(--border);padding:48px 24px 32px;background:var(
|
|||
<div class="feature-card">
|
||||
<div class="feature-icon purple">🔒</div>
|
||||
<h3>Secure by Default</h3>
|
||||
<p>SSRF protection blocks internal IPs and metadata endpoints. Strict input validation and secure defaults built in.</p>
|
||||
<p>SSRF protection blocks internal IPs and metadata endpoints. Rate limiting and strict input validation built in.</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<div class="feature-icon orange">📐</div>
|
||||
|
|
@ -633,7 +633,10 @@ async function runPlayground(){
|
|||
}
|
||||
}
|
||||
|
||||
// FAQ toggles — handled by inline onclick, no duplicate listeners needed
|
||||
// FAQ toggles
|
||||
document.querySelectorAll('.faq-q').forEach(function(q){
|
||||
q.addEventListener('click',function(){this.parentElement.classList.toggle('open')});
|
||||
});
|
||||
|
||||
// Smooth scroll
|
||||
document.querySelectorAll('a[href^="#"]').forEach(function(a){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue