Skip to content

Instantly share code, notes, and snippets.

@stevenkolawole
Created August 5, 2021 18:33
Show Gist options
  • Select an option

  • Save stevenkolawole/f18832350a1768cc59da0a0bf8af6fc5 to your computer and use it in GitHub Desktop.

Select an option

Save stevenkolawole/f18832350a1768cc59da0a0bf8af6fc5 to your computer and use it in GitHub Desktop.
name: Build Docker image and deploy to Heroku
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Login to Heroku Container registry
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:login
- name: Build and push
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:push -a app_name web
- name: Release
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:release -a app_name web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment