Skip to content

Run migrations for za #57

Run migrations for za

Run migrations for za #57

Workflow file for this run

# This workflow can be run from the CLI for any environment
# gh workflow run migrate.yaml -f environment=ENVIRONMENT
# OR
# cf run-task getgov-ENVIRONMENT --command 'python manage.py migrate' --name migrate
name: Migrate data
run-name: Run migrations for ${{ github.event.inputs.environment }}
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Which environment should we run migrations for?
options:
- stable
- staging
- nl
- rh
- za
- gd
- rb
- ko
- ab
- bl
- rjm
- dk
jobs:
migrate:
runs-on: ubuntu-latest
env:
CF_USERNAME: CF_${{ github.event.inputs.environment }}_USERNAME
CF_PASSWORD: CF_${{ github.event.inputs.environment }}_PASSWORD
steps:
- name: Run Django migrations for ${{ github.event.inputs.environment }}
uses: 18f/cg-deploy-action@main
with:
cf_username: ${{ secrets[env.CF_USERNAME] }}
cf_password: ${{ secrets[env.CF_PASSWORD] }}
cf_org: cisa-dotgov
cf_space: ${{ github.event.inputs.environment }}
full_command: "cf run-task getgov-${{ github.event.inputs.environment }} --command 'python manage.py migrate' --name migrate"