-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (57 loc) · 1.5 KB
/
deploy-production.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
---
name: deploy
on:
push:
branches:
- main
jobs:
publish:
name: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: login to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: publish
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/gsa/cf-backup-manager:latest
deploy-staging:
name: deploy (staging)
environment: staging
runs-on: ubuntu-latest
needs:
- publish
steps:
- name: checkout
uses: actions/checkout@v2
- name: deploy
uses: usds/cloud-gov-cli@master
with:
command: push backup-manager --vars-file vars.staging.yml --strategy rolling
org: gsa-datagov
space: staging
user: ${{secrets.CF_SERVICE_USER}}
password: ${{secrets.CF_SERVICE_AUTH}}
deploy-production:
name: deploy (production)
environment: production
runs-on: ubuntu-latest
needs:
- deploy-staging
steps:
- name: checkout
uses: actions/checkout@v2
- name: deploy
uses: usds/cloud-gov-cli@master
with:
command: push backup-manager --vars-file vars.production.yml --strategy rolling
org: gsa-datagov
space: prod
user: ${{secrets.CF_SERVICE_USER}}
password: ${{secrets.CF_SERVICE_AUTH}}