Skip to content

Heroku DB init

Heroku DB init #31

name: Heroku DB init
on:
workflow_dispatch:
inputs:
app-name:
required: true
type: string
description: 'Review app name'
testing-db:
type: string
description: 'Testing Database'
jobs:
custom-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Heroku CLI
run: |
curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: Add Heroku login credentials
run: |
cat > ~/.netrc <<EOF
machine api.heroku.com
login $HEROKU_EMAIL
password $HEROKU_API_KEY
machine git.heroku.com
login $HEROKU_EMAIL
password $HEROKU_API_KEY
EOF
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}
- name: Add database to Heroku app
run: |
./scripts/provision-heroku-db.sh $HEROKU_APP_NAME $HEROKU_TESTING_DB
env:
HEROKU_APP_NAME: ${{ inputs.app-name }}
HEROKU_TESTING_DB: ${{ inputs.testing-db }}