Skip to content

Commit

Permalink
Merge pull request #565 from microbiomedata/564-publish-container-ima…
Browse files Browse the repository at this point in the history
…ges-to-github-container-registry-ghcr-instead-of-docker-hub

Configure GitHub Actions to push container image to GitHub Container Registry (in addition to Docker Hub)
  • Loading branch information
eecavanna committed Jun 19, 2024
2 parents f0e8096 + 60641f3 commit 2d7a821
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build-and-release-to-spin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
with:
images: |
microbiomedata/nmdc-runtime-${{ matrix.image }}
ghcr.io/microbiomedata/nmdc-runtime-${{ matrix.image }}
flavor: |
latest=false
tags: |
Expand All @@ -63,6 +64,14 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Reference: https://docs.docker.com/build/ci/github-actions/push-multi-registries/
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 2d7a821

Please sign in to comment.