-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit - GitHub action to publish docker image on GHCR
- Loading branch information
1 parent
b8712c2
commit 5140d87
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "Publish Docker image" | ||
# Name of this action (else will name after the commits) | ||
run-name: Publish Docker image on GitHub container registry (ghcr.io) | ||
|
||
# Source: https://dev.to/github/publishing-a-docker-image-to-githubs-container-repository-4n50 | ||
|
||
on: [push] | ||
|
||
jobs: | ||
Publish-docker-image: | ||
runs-on: ubuntu-latest | ||
name: Publish docker image | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build the Docker image | ||
run: | | ||
docker build . --tag ghcr.io/pythonhealthdatascience/covid19:latest | ||
docker push ghcr.io/pythonhealthdatascience/covid19:latest |