Skip to content

Commit

Permalink
Also push to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 16, 2022
1 parent 5fb5267 commit f2140e8
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/docker_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,27 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub registry
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
mcranmer/pysr
ghcr.io/${{ github.repository }}
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
Expand All @@ -47,12 +61,6 @@ jobs:
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
Expand Down

0 comments on commit f2140e8

Please sign in to comment.