Skip to content

Commit

Permalink
Initial commit - GitHub action to publish docker image on GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
amyheather committed Jun 10, 2024
1 parent b8712c2 commit 5140d87
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker_ghcr.yaml
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

0 comments on commit 5140d87

Please sign in to comment.