-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (32 loc) · 1.21 KB
/
db_apply_anonimized.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
name: "DB - Apply Anonymized db"
on:
push:
branches:
- OSDEV-862-create-script-for-anonymizing-dump
workflow_dispatch:
jobs:
save-anonymized-db:
runs-on: ubuntu-latest
environment: ${{ inputs.deploy-env || 'Test' }}
steps:
- name: Get Environment Name for ${{ vars.ENV_NAME }}
id: get_env_name
uses: Entepotenz/change-string-case-action-min-dependencies@v1
with:
string: ${{ vars.ENV_NAME }}
- name: Checkout repo
uses: actions/checkout@v4
- name: Restore database for ${{ vars.ENV_NAME }}
run: |
cd ./src/anon-tools
echo ${{ secrets.KEY_FILE }} >> ./keys/key
docker build -t restore -f Dockerfile.restore .
docker run -v ./keys/key:/keys/key --shm-size=2gb --rm \
-e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \
-e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} \
-e AWS_DEFAULT_REGION=eu-west-1 \
-e ENVIRONEMT=${{ vars.ENV_NAME }} \
-e DATABASE_NAME=opensupplyhub \
-e DATABASE_USERNAME=opensupplyhub \
-e DATABASE_PASSWORD=${{ secrets.DATABASE_PASSWORD }} \
restore