diff --git a/.github/workflows/docker_deploy.yml b/.github/workflows/docker_deploy.yml index b140204d9..7ae27c0d1 100644 --- a/.github/workflows/docker_deploy.yml +++ b/.github/workflows/docker_deploy.yml @@ -26,6 +26,19 @@ 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 @@ -33,6 +46,7 @@ jobs: # 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 @@ -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: