Skip to content

Commit

Permalink
ci(github action): activated action to publish docker image on GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
amyheather committed Jul 26, 2024
1 parent cb716e4 commit 6684b0b
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/docker_ghr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ 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:
# TODO: Uncomment these lines once have added Dockerfile
# (Currently, they are ensuring that action can only be triggered manually)
# push:
# branches: main
push:
branches: main
workflow_dispatch:

jobs:
Expand All @@ -20,10 +18,6 @@ jobs:
contents: read
packages: write

# TODO: Remove this line once have added Dockerfile
# (Currently, its ensuring a triggered action will skip this job)
if: false

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -35,8 +29,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# TODO: Update "envname" below to the correct name for your project's environment
- name: Build the Docker image
run: |
docker build . --file reproduction/docker/Dockerfile --tag ghcr.io/pythonhealthdatascience/envname:latest
docker push ghcr.io/pythonhealthdatascience/envname:latest
docker build . --file reproduction/docker/Dockerfile --tag ghcr.io/pythonhealthdatascience/lim2020:latest
docker push ghcr.io/pythonhealthdatascience/lim2020:latest

0 comments on commit 6684b0b

Please sign in to comment.