-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (29 loc) · 1.02 KB
/
docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Build and publish docker image
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . -t ghcr.io/razdeep/cfpredictor:latest
- name: login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Publish image
run: docker push ghcr.io/razdeep/cfpredictor:latest
- name: Deploy to heroku
# uses: gonuit/heroku-docker-deploy@9ab97585f979857642d66612a2ae4062b3347d53
# This action rebuild the docker image again (though it is built earlier once) and pushes to heroku
uses: gonuit/[email protected]
with:
heroku_app_name: codeforces-rating-predictor
email: [email protected]
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}