Skip to content

Seed data to e2e core=4395e13 #45

Seed data to e2e core=4395e13

Seed data to e2e core=4395e13 #45

Workflow file for this run

name: Seed data
run-name: Seed data to ${{ inputs.environment }} core=${{ 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
- e2e
core-image-tag:
description: Core DockerHub image tag
jobs:
seed-data:
environment: ${{ inputs.environment }}
runs-on: ubuntu-22.04
outputs:
outcome: ${{ steps.seed.outcome }}
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: ${{ inputs.core-image-tag }}
run: |
cd opencrvs-core
git checkout ${{ inputs.core-image-tag }}
- name: Install dependencies
working-directory: ./opencrvs-core
run: yarn install
- name: Seed data on given environment
uses: nick-fields/retry@v2
id: seed
with:
timeout_minutes: 10
max_attempts: 5
command: |
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 }}