-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (30 loc) · 929 Bytes
/
heroku.yml
File metadata and controls
31 lines (30 loc) · 929 Bytes
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
name: Deployment to Heroku
on:
workflow_dispatch:
inputs:
git-ref:
description: Get Ref (Optional)
required: false
jobs:
build_and_deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- name: Clone Repository (Latest)
uses: actions/checkout@v2
if: github.event.inputs.git-ref == ''
- name: Clone Repository (Custom Ref)
uses: actions/checkout@v2
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
- name: Build and deploy the Docker image
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
APP_NAME: ${{ secrets.APP_NAME }}
run: |
docker login --username=_ --password=$HEROKU_API_KEY registry.heroku.com
heroku container:push web -a $APP_NAME
heroku container:release web -a $APP_NAME