forked from opencrvs/opencrvs-countryconfig
-
Notifications
You must be signed in to change notification settings - Fork 17
66 lines (63 loc) · 1.75 KB
/
seed-data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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 }}