mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-28 11:21:38 -05:00
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Deploy to prototype environment
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: [ Run checks ]
|
|
types:
|
|
- completed
|
|
# branches: [ main ]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
|
|
steps:
|
|
- name: Install container dependencies
|
|
run: |
|
|
sudo apt-get update \
|
|
&& sudo apt-get install -y --no-install-recommends \
|
|
libcurl4-openssl-dev
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: "3.9"
|
|
- name: Install application dependencies
|
|
run: make bootstrap
|
|
- name: Install Cloud Foundry CLI
|
|
run: |
|
|
curl -v -L -o cf-cli_amd64.deb 'https://packages.cloudfoundry.org/stable?release=debian64&version=v7&source=github'
|
|
sudo dpkg -i cf-cli_amd64.deb
|
|
- name: Deploy to gsa-10x-prototyping api
|
|
run: make cf-deploy
|
|
with:
|
|
CF_ORG: gsa-10x-prototyping
|
|
CF_SPACE: 10x-notifications
|
|
CF_APP: notifications-api
|
|
DANGEROUS_SALT: {{secrets.DANGEROUS_SALT}}
|
|
SECRET_KEY: {{secrets.SECRET_KEY}}
|
|
AWS_ACCESS_KEY_ID: {{secrets.AWS_ACCESS_KEY_ID}}
|
|
AWS_SECRET_ACCESS_KEY: {{secrets.AWS_SECRET_ACCESS_KEY}}
|
|
|
|
bail:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
|
steps:
|
|
- run: echo 'Checks failed, preventing deploy' |