-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (56 loc) · 1.98 KB
/
deploy.yaml
File metadata and controls
62 lines (56 loc) · 1.98 KB
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
name: Continuous deployment to cloud.gov
on:
workflow_call:
inputs:
environment:
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v3
- name: Configure secrets
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CG_USERNAME }}
cf_password: ${{ secrets.CG_PASSWORD }}
cf_org: gsa-smartpay
cf_space: ${{ inputs.environment }}
command: >-
cf update-user-provided-service smartpay-training-secrets -p '{
"JWT_SECRET": "${{ secrets.JWT_SECRET }}",
"SMTP_PASSWORD": "${{ secrets.SMTP_PASSWORD }}"
}'
- name: Configure environment variables
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CG_USERNAME }}
cf_password: ${{ secrets.CG_PASSWORD }}
cf_org: gsa-smartpay
cf_space: ${{ inputs.environment }}
command: >-
bin/cg-set-env.sh ${{ inputs.environment }}
BASE_URL=${{ vars.BASE_URL }}
SMTP_USER=${{ vars.SMTP_USER }}
SMTP_SERVER=${{ vars.SMTP_SERVER }}
SMTP_PORT=${{ vars.SMTP_PORT }}
- name: Deploy the application
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CG_USERNAME }}
cf_password: ${{ secrets.CG_PASSWORD }}
cf_org: gsa-smartpay
cf_space: ${{ inputs.environment }}
cf_vars_file: manifest-vars.${{ inputs.environment }}.yml
- name: Run database migrations
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CG_USERNAME }}
cf_password: ${{ secrets.CG_PASSWORD }}
cf_org: gsa-smartpay
cf_space: ${{ inputs.environment }}
command: cf run-task smartpay-training -c "alembic upgrade head"