Environment Action
The Environment Action creates and updates Quant Cloud environments with compose specifications or direct configuration.
Repository: quantcdn/quant-cloud-environment-action
What It Does
Section titled “What It Does”- Creates new environments
- Updates existing environments
- Deploys compose specifications
- Handles create-or-update logic
Inputs
Section titled “Inputs”| Input | Required | Description |
|---|---|---|
api_key | Yes | Quant API key |
organization | Yes | Organization ID |
app_name | Yes | Application name |
environment_name | Yes | Environment name |
compose_spec | Yes | Translated compose definition |
operation | No | create, update, or create-or-update (default) |
base_url | No | API URL (defaults to production) |
Operations
Section titled “Operations”create- Create new environment (fails if exists)update- Update existing environment (fails if doesn’t exist)create-or-update- Smart operation that handles both (default, recommended)
Basic Usage with Compose Action
Section titled “Basic Usage with Compose Action”- uses: quantcdn/quant-cloud-compose-action@v1 id: compose with: api_key: ${{ secrets.QUANT_API_KEY }} organization: my-org compose_file: docker-compose.yml
- uses: quantcdn/quant-cloud-environment-action@v1 with: api_key: ${{ secrets.QUANT_API_KEY }} organization: my-org app_name: my-app environment_name: production compose_spec: ${{ steps.compose.outputs.translated_compose }} operation: create-or-updateWith Init Action (Recommended)
Section titled “With Init Action (Recommended)”Let init action detect the environment:
- uses: quantcdn/quant-cloud-init-action@v1 id: init with: quant_organization: ${{ secrets.QUANT_ORGANIZATION }} quant_api_key: ${{ secrets.QUANT_API_KEY }}
- uses: quantcdn/quant-cloud-compose-action@v1 id: compose with: api_key: ${{ secrets.QUANT_API_KEY }} organization: ${{ secrets.QUANT_ORGANIZATION }} compose_file: docker-compose.yml
- uses: quantcdn/quant-cloud-environment-action@v1 with: api_key: ${{ secrets.QUANT_API_KEY }} organization: ${{ secrets.QUANT_ORGANIZATION }} app_name: ${{ steps.init.outputs.quant_application }} environment_name: ${{ steps.init.outputs.environment_name }} compose_spec: ${{ steps.compose.outputs.translated_compose }}Conditional Create/Update
Section titled “Conditional Create/Update”Use init action’s outputs to decide:
- uses: quantcdn/quant-cloud-init-action@v1 id: init
- name: Create environment if: steps.init.outputs.environment_exists == 'false' uses: quantcdn/quant-cloud-environment-action@v1 with: operation: create environment_name: ${{ steps.init.outputs.environment_name }}
- name: Update environment if: steps.init.outputs.environment_exists == 'true' uses: quantcdn/quant-cloud-environment-action@v1 with: operation: update environment_name: ${{ steps.init.outputs.environment_name }}Next Steps
Section titled “Next Steps”- Init Action - Environment detection
- Compose Action - Translate docker-compose files
- Environment Vars Action - Manage variables