Merge pull request #27 from GSA/upgrade-cleanup #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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}} |