From d1cbbd08607bf786f0d0c6bffa87a786dbe440b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Thierry=20K=C3=A9chichian?= Date: Thu, 7 Dec 2023 09:18:24 +0100 Subject: [PATCH] Docker Push in one Step (#14850) --- .github/workflows/preview_ci.yml | 8 ++------ .github/workflows/release_ci.yml | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/preview_ci.yml b/.github/workflows/preview_ci.yml index f3ed27aeb0d..58da8080669 100644 --- a/.github/workflows/preview_ci.yml +++ b/.github/workflows/preview_ci.yml @@ -58,11 +58,11 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub if: matrix.os == 'ubuntu-latest' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Deploy preview docker image for linux + - name: Deploy preview docker image for linux and windows shell: pwsh if: matrix.os == 'ubuntu-latest' run: | @@ -72,9 +72,5 @@ jobs: dotnet publish -c Release --property:PublishDir=$output --no-build --framework net8.0 docker buildx build --load -f Dockerfile-CI --platform=linux/amd64 -t orchardproject/orchardcore-cms-linux:dev . docker push orchardproject/orchardcore-cms-linux:dev - - name: Deploy preview docker image for windows - shell: pwsh - if: matrix.os == 'ubuntu-latest' - run: | docker buildx build --load -f Dockerfile-CI --platform=windows/amd64 -t orchardproject/orchardcore-cms-windows:dev . docker push orchardproject/orchardcore-cms-windows:dev diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 0781db1bca2..d28bc4d6695 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -69,11 +69,11 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub if: matrix.os == 'ubuntu-latest' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Deploy release docker image for linux + - name: Deploy release docker image for linux and windows shell: pwsh if: matrix.os == 'ubuntu-latest' run: | @@ -84,10 +84,6 @@ jobs: docker buildx build --load -f Dockerfile-CI --platform=linux/amd64 -t orchardproject/orchardcore-cms-linux:latest -t orchardproject/orchardcore-cms-linux:${{ steps.get_version.outputs.VERSION }} . docker push orchardproject/orchardcore-cms-linux:latest docker push "orchardproject/orchardcore-cms-linux:${{ steps.get_version.outputs.VERSION }}" - - name: Deploy release docker image for windows - shell: pwsh - if: matrix.os == 'ubuntu-latest' - run: | docker buildx build --load -f Dockerfile-CI --platform=windows/amd64 -t orchardproject/orchardcore-cms-windows:latest -t orchardproject/orchardcore-cms-windows:${{ steps.get_version.outputs.VERSION }} . docker push orchardproject/orchardcore-cms-windows:latest docker push "orchardproject/orchardcore-cms-windows:${{ steps.get_version.outputs.VERSION }}"