diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index a531470d9..2f4bd4542 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -13,8 +13,8 @@ on: workflow_dispatch: jobs: - push_to_ghcr: - name: Push Release Image to GitHub Packages + push: + name: Push Release Image runs-on: ubuntu-latest steps: - name: Check out the repo @@ -32,14 +32,20 @@ jobs: id: buildx uses: docker/setup-buildx-action@v2 - - name: Login to Github Packages + - name: Login to GitHub Packages uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build Docker Image + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push Docker Image uses: docker/build-push-action@v3 with: push: true @@ -47,5 +53,7 @@ jobs: tags: | ghcr.io/diced/zipline:latest ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }} + ${{ secrets.DOCKERHUB_USERNAME }}/zipline:latest + ${{ secrets.DOCKERHUB_USERNAME }}/zipline:${{ steps.version.outputs.zipline_version }} cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 567d89a93..524c9689d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,8 +12,8 @@ on: workflow_dispatch: jobs: - push_to_ghcr: - name: Push Image to GitHub Packages + push: + name: Push Image runs-on: ubuntu-latest steps: - name: Check out the repo @@ -38,7 +38,13 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build Docker Image + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push Docker Image uses: docker/build-push-action@v3 with: push: true @@ -46,5 +52,7 @@ jobs: tags: | ghcr.io/diced/zipline:trunk ghcr.io/diced/zipline:trunk-${{ steps.version.outputs.zipline_version }} + ${{ secrets.DOCKERHUB_USERNAME }}/zipline:trunk + ${{ secrets.DOCKERHUB_USERNAME }}/zipline:trunk-${{ steps.version.outputs.zipline_version }} cache-from: type=gha cache-to: type=gha,mode=max