Deploy Docker Image to Heroku #74
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 Docker Image to Heroku | |
on: | |
workflow_dispatch: | |
inputs: | |
appName: | |
description: 'Heroku App Name' | |
required: true | |
type: string | |
imageName: | |
description: 'Docker Image Name' | |
required: true | |
type: string | |
imageTag: | |
description: 'Docker Image Tag' | |
required: true | |
type: string | |
default: 'latest' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: heroku container:login | |
- name: Push | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: heroku container:push ${{ inputs.imageName }} -a ${{ inputs.appName }} --recursive --arg BASE_TAG=${{ inputs.imageTag }} | |
- name: Release | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: heroku container:release ${{ inputs.imageName }} -a ${{ inputs.appName }} |