Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
Use crazy-max/ghaction-docker-login action
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Aug 17, 2020
1 parent d0423a4 commit bb77f35
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 52 deletions.
40 changes: 14 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
40 changes: 14 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand Down

0 comments on commit bb77f35

Please # to comment.