Seed data to qa core=a6d7058 #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Seed data | |
run-name: Seed data to ${{ github.event.inputs.environment }} core=${{ github.event.inputs.core-image-tag }} | |
on: | |
workflow_call: | |
inputs: | |
environment: | |
required: true | |
type: string | |
core-image-tag: | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
environment: | |
type: choice | |
description: Environment to seed data | |
required: true | |
default: 'development' | |
options: | |
- development | |
- qa | |
- staging | |
- production | |
core-image-tag: | |
description: Core DockerHub image tag | |
jobs: | |
seed-data: | |
environment: ${{ github.event.inputs.environment }} | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
steps: | |
- name: Clone core | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
repository: 'opencrvs/opencrvs-core' | |
path: './opencrvs-core' | |
- name: Set CORE_VERSION from inputs | |
if: ${{ github.event.inputs.core-image-tag }} | |
run: | | |
cd opencrvs-core | |
git checkout ${{ github.event.inputs.core-image-tag }} | |
- name: Install dependencies | |
working-directory: ./opencrvs-core | |
run: yarn install | |
- name: Seed data on given environment | |
run: | | |
cd ./opencrvs-core | |
yarn seed:prod | |
env: | |
ACTIVATE_USERS: ${{ vars.ACTIVATE_USERS }} | |
GATEWAY_HOST: ${{ vars.GATEWAY_HOST }} | |
AUTH_HOST: ${{ vars.AUTH_HOST }} | |
COUNTRY_CONFIG_HOST: ${{ vars.COUNTRY_CONFIG_HOST }} | |
SUPER_USER_PASSWORD: ${{ secrets.SUPER_USER_PASSWORD }} |