GitHub Actions Overview
Quant Cloud provides a complete suite of official GitHub Actions to automate your deployment workflows. These actions work together to provide seamless CI/CD integration for containerized applications.
Available Actions
Section titled “Available Actions”Core Workflow Actions
Section titled “Core Workflow Actions”| Action | Purpose | Repository |
|---|---|---|
| Init | Initialize deployment, authenticate registry, detect environment | quant-cloud-init-action |
| Compose | Translate docker-compose files | quant-cloud-compose-action |
| Environment | Create/update environments | quant-cloud-environment-action |
Management Actions
Section titled “Management Actions”| Action | Purpose | Repository |
|---|---|---|
| Environment Vars | Manage environment variables and secrets | quant-cloud-environment-var-action |
| Sync | Sync databases and files between environments | quant-cloud-environment-sync-action |
| Backup | Create backups and manage retention | quant-cloud-environment-backup-action |
Typical Workflow Pattern
Section titled “Typical Workflow Pattern”Most deployments follow this pattern:
jobs: deploy: runs-on: ubuntu-latest steps: # 1. Initialize - Authenticate and detect environment - uses: quantcdn/quant-cloud-init-action@v1 id: init with: quant_organization: ${{ secrets.QUANT_ORGANIZATION }} quant_api_key: ${{ secrets.QUANT_API_KEY }} # 2. Build and push images (Docker already logged in by init) - uses: docker/build-push-action@v5 with: push: true tags: ${{ steps.init.outputs.stripped_endpoint }}/... # 3. Translate compose file (if using docker-compose) - uses: quantcdn/quant-cloud-compose-action@v1 id: compose with: compose_file: docker-compose.yml # 4. Deploy environment - uses: quantcdn/quant-cloud-environment-action@v1 with: operation: update compose_spec: ${{ steps.compose.outputs.translated_compose }}Getting Started
Section titled “Getting Started”Prerequisites
Section titled “Prerequisites”- GitHub Repository with your application code
- Quant Cloud Account with:
- Organization ID
- API Key (from dashboard)
- Docker Images or docker-compose.yml file
Setup Steps
Section titled “Setup Steps”-
Add secrets to your repository:
QUANT_ORGANIZATION- Your org IDQUANT_API_KEY- Your API key
-
Create workflow file:
.github/workflows/deploy.yml -
Choose your workflow pattern:
Action Categories
Section titled “Action Categories”Deployment Actions
Section titled “Deployment Actions”Essential for getting your code deployed:
- Init Action - Start here, required for all workflows
- Compose Action - For docker-compose based deployments
- Environment Action - Create and manage environments
Operational Actions
Section titled “Operational Actions”For ongoing management and operations:
- Environment Vars Action - Configure runtime variables
- Sync Action - Sync data between environments
- Backup Action - Automate backups and retention
Common Use Cases
Section titled “Common Use Cases”Production Deployment
Section titled “Production Deployment”Deploy to production when code is merged to main branch. See workflow example →
PR Preview Environments
Section titled “PR Preview Environments”Automatically create preview environments for pull requests. See workflow example →
Feature Branch Environments
Section titled “Feature Branch Environments”Deploy feature branches to isolated environments. See workflow example →
Database Sync
Section titled “Database Sync”Sync production database to staging for testing. See workflow example →
Scheduled Backups
Section titled “Scheduled Backups”Automate daily backups with retention policies. See workflow example →
Best Practices
Section titled “Best Practices”- Always start with Init Action - It handles authentication and environment detection
- Use image suffixes - Leverage
image_suffixoutput from init for consistent tagging - Validate before deploy - Use compose validation for complex configurations
- Protect production - Use GitHub environment protection rules
- Clean up previews - Remove PR environments when PRs are closed
- Monitor workflows - Set up notifications for deployment failures