Skip to content

I'm going to try to use docker-compose-production.yml to build my ima… #84

I'm going to try to use docker-compose-production.yml to build my ima…

I'm going to try to use docker-compose-production.yml to build my ima… #84

Workflow file for this run

name: Deploy to Heroku
on:
push:
branches:
- HW-166-add-tests-to-docker-container # Branch to trigger deployment
jobs:
deploy:
runs-on: ubuntu-latest
env:
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }} # Your Heroku app name
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Heroku Container Registry
run: |
echo "$HEROKU_API_KEY" | docker login --username="$HEROKU_EMAIL" --password-stdin registry.heroku.com
- name: Build Images Using Docker Compose
run: |
docker-compose -f code/docker-compose-production.yml build
- name: Tag and Push API Image to Heroku Container Registry
run: |
docker tag api-production:latest registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
docker push registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
- name: Tag and Push Client Image to Heroku Container Registry
run: |
docker tag client-production:latest registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
docker push registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
- name: Release on Heroku
run: |
heroku container:release web --app ${{ env.HEROKU_APP_NAME }}