Skip to content

Commit

Permalink
Docker Push in one Step (#14850)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtkech authored Dec 7, 2023
1 parent 9d3ff6a commit d1cbbd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/preview_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
8 changes: 2 additions & 6 deletions .github/workflows/release_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}"

0 comments on commit d1cbbd0

Please sign in to comment.