-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (62 loc) · 2 KB
/
build-for-heroku.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This is a basic workflow to help you get started with Actions
name: Build for Heroku
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:
inputs:
heroku_app_name:
required: true
type: string
description: The name of the Heroku app to deploy to
heroku_email:
type: string
required: true
description: The email address of the Heroku user
heroku_process_types:
type: choice
required: false
default: --recursive
description: The process types to deploy
options:
- --recursive
- web
- web worker
workflow_call:
inputs:
heroku_app_name:
required: true
type: string
heroku_email:
type: string
required: true
heroku_process_types:
type: string
required: false
default: --recursive
description: The process types to deploy
secrets:
HEROKU_API_KEY:
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/[email protected]
- name: Install Heroku CLI
if: ${{ env.ACT }}
run: curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{ inputs.heroku_app_name }} # Must be unique in Heroku
heroku_email: ${{ inputs.heroku_email }}
justlogin: true
- name: Login to Heroku Container registry
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:login
- name: Build and push Docker image to registry
run: heroku container:push ${{ inputs.heroku_process_types }} -a ${{ inputs.heroku_app_name }}