diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d65e94..2b4a0f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,13 +89,12 @@ jobs: --tag crazymax/ghaction-docker-buildx:cache \ --file ./test/Dockerfile-diun ./test - - name: Docker Login + name: Login to DockerHub if: success() && github.event_name != 'pull_request' - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: | - echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + uses: crazy-max/ghaction-docker-login@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Docker Buildx (push) if: success() && github.event_name != 'pull_request' @@ -107,15 +106,10 @@ jobs: --tag crazymax/ghaction-docker-buildx:cache \ --file ./test/Dockerfile-diun ./test - - name: Docker Check Manifest + name: Inspect image if: always() && github.event_name != 'pull_request' run: | - docker run --rm mplatform/mquery crazymax/ghaction-docker-buildx:cache - - - name: Clear - if: always() - run: | - rm -f ${HOME}/.docker/config.json + docker buildx imagetools inspect crazymax/ghaction-docker-buildx:cache push: runs-on: ubuntu-latest @@ -158,25 +152,19 @@ jobs: run: | docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }} - - name: Docker Login + name: Login to DockerHub if: success() && github.event_name != 'pull_request' - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: | - echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + uses: crazy-max/ghaction-docker-login@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Docker Buildx (push) if: success() && github.event_name != 'pull_request' run: | docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} - - name: Docker Check Manifest - if: always() && github.event_name != 'pull_request' - run: | - docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }} - - - name: Clear + name: Inspect image if: always() && github.event_name != 'pull_request' run: | - rm -f ${HOME}/.docker/config.json + docker buildx imagetools inspect ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 96d3d2a..25c678e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 3.3.0 (2020/08/17) + +* Use crazy-max/ghaction-docker-login action +* Update deps + ## 3.2.0 (2020/06/25) * `qemu-version` not taken into account (#220) diff --git a/README.md b/README.md index b4f7fe1..29360ee 100644 --- a/README.md +++ b/README.md @@ -134,28 +134,22 @@ jobs: run: | docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }} - - name: Docker Login + name: Login to DockerHub if: success() && github.event_name != 'pull_request' - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: | - echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + uses: crazy-max/ghaction-docker-login@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Docker Buildx (push) if: success() && github.event_name != 'pull_request' run: | docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} - - name: Docker Check Manifest - if: always() && github.event_name != 'pull_request' - run: | - docker run --rm mplatform/mquery ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }} - - - name: Clear + name: Inspect image if: always() && github.event_name != 'pull_request' run: | - rm -f ${HOME}/.docker/config.json + docker buildx imagetools inspect ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }} ``` ### Leverage buildx cache @@ -201,12 +195,11 @@ jobs: --tag crazymax/diun:latest \ --file ./Dockerfile-diun ./ - - name: Docker Login - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: | - echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + name: Login to DockerHub + uses: crazy-max/ghaction-docker-login@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Docker Buildx (push) run: | @@ -217,14 +210,9 @@ jobs: --tag crazymax/diun:latest \ --file ./Dockerfile-diun ./ - - name: Docker Check Manifest - run: | - docker run --rm mplatform/mquery crazymax/diun:latest - - - name: Clear - if: always() + name: Inspect image run: | - rm -f ${HOME}/.docker/config.json + docker buildx imagetools inspect crazymax/diun:latest ``` ## Projects using this action