-
Notifications
You must be signed in to change notification settings - Fork 34
49 lines (42 loc) · 1.5 KB
/
deploy-development.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
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