generated from DFE-Digital/govuk-rails-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (41 loc) · 1.44 KB
/
refresh_migration_database.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
name: Refresh migration DB from production DB
on:
workflow_dispatch:
inputs:
environment:
description: GitHub environment to refresh from
type: choice
default: production
options:
- production
required: true
schedule:
- cron: "0 0 * * *" # Run at midnight.
jobs:
refresh-migration-db:
runs-on: ubuntu-20.04
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Refresh migration DB
uses: ./.github/actions/refresh-migration-database
with:
environment: production
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
- name: Login
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- uses: DFE-Digital/github-actions/set-kubelogin-environment@master
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
- name: Install kubectl
uses: DFE-Digital/github-actions/set-kubectl@master
- name: Set AKS credentials (migration)
shell: bash
run: make ci migration get-cluster-credentials
- name: Generate known keys
shell: bash
run: |
kubectl -n cpd-production exec -ti --tty deployment/cpd-ecf-migration-web -- /bin/sh -c "cd /app && bundle exec rails runner \"PaperTrail.request.whodunnit = %{CI}; Migration::ParityCheck::TokenProvider.new.generate!\""