heroku workflows #4
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: CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build Docker image | |
run: docker build -t registry.heroku.com/${{ secrets.HEROKU_APP }}/web:latest . | |
- name: Docker image info | |
run: docker images | |
- name: Login to container registry | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: heroku container:login | |
- name: Push Docker image | |
run: docker push registry.heroku.com/${{ secrets.HEROKU_APP }}/web | |
- name: Release | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: heroku container:release -a ${{ secrets.HEROKU_APP }} web |