Delete Dockerfile #7
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/CD to Heroku with Docker | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Heroku Container Registry | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: echo $HEROKU_API_KEY | docker login --username=_ --password-stdin registry.heroku.com | |
- name: Build and push Docker image | |
run: | | |
docker buildx build --platform linux/amd64 --push -t registry.heroku.com/${{ secrets.HEROKU_APP_NAME }}/web . | |
- name: Release the Docker image | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
run: | | |
heroku container:release web -a ${{ secrets.HEROKU_APP_NAME }} |