Deploy Development Environment #681
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 Development Environment | |
on: | |
workflow_dispatch: | |
inputs: | |
app: | |
description: "Name of the app to deploy to heroku" | |
required: true | |
tag: | |
description: "Tag to use for heroku deployments" | |
required: true | |
workflow_call: | |
inputs: | |
app: | |
description: "Name of the app to deploy to heroku" | |
required: true | |
type: string | |
tag: | |
description: "Tag to use for heroku deployments" | |
required: true | |
type: string | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy development ${{ inputs.app }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to Heroku Container registry | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_DEV_API_KEY }} | |
run: heroku container:login | |
- name: Pull latest ${{ inputs.app }} image | |
run: docker pull ghcr.io/xgovformbuilder/digital-form-builder-${{ inputs.app }}:${{ inputs.tag }} | |
- name: Tag Image | |
run: docker tag ghcr.io/xgovformbuilder/digital-form-builder-${{ inputs.app }}:${{ inputs.tag }} registry.heroku.com/digital-form-builder-${{ inputs.app }}/web | |
- name: Push to Heroku Registry | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_DEV_API_KEY }} | |
run: docker push registry.heroku.com/digital-form-builder-${{ inputs.app }}/web | |
- name: Release | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_DEV_API_KEY }} | |
run: heroku container:release -a digital-form-builder-${{ inputs.app }} web |