Skip to content

Environment Vars Action

The Environment Vars Action manages environment variables and secrets for your Quant Cloud environments.

Repository: quantcdn/quant-cloud-environment-var-action

  1. Sets environment variables
  2. Updates existing variables
  3. Manages secrets securely
  4. Handles bulk operations
- uses: quantcdn/quant-cloud-environment-var-action@v1
with:
api_key: ${{ secrets.QUANT_API_KEY }}
organization: my-org
app_name: my-app
environment_name: production
variables: |
APP_ENV=production
LOG_LEVEL=info
DEBUG=false
- 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-environment-var-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 }}
variables: |
APP_VERSION=${{ github.sha }}
BUILD_DATE=${{ github.event.head_commit.timestamp }}

Use GitHub secrets for sensitive values:

- uses: quantcdn/quant-cloud-environment-var-action@v1
with:
api_key: ${{ secrets.QUANT_API_KEY }}
organization: my-org
app_name: my-app
environment_name: production
variables: |
DATABASE_URL=${{ secrets.DATABASE_URL }}
API_KEY=${{ secrets.THIRD_PARTY_API_KEY }}
SECRET_KEY=${{ secrets.APP_SECRET_KEY }}

Set dynamic values during deployment:

- uses: quantcdn/quant-cloud-environment-var-action@v1
with:
variables: |
GIT_COMMIT=${{ github.sha }}
GIT_BRANCH=${{ github.ref_name }}
DEPLOYED_BY=${{ github.actor }}
DEPLOYMENT_TIME=${{ github.event.head_commit.timestamp }}

Different values for each environment:

- uses: quantcdn/quant-cloud-environment-var-action@v1
if: steps.init.outputs.is_production == 'true'
with:
variables: |
APP_ENV=production
DEBUG=false
LOG_LEVEL=warning
- uses: quantcdn/quant-cloud-environment-var-action@v1
if: steps.init.outputs.is_production == 'false'
with:
variables: |
APP_ENV=staging
DEBUG=true
LOG_LEVEL=debug