Skip to content

Commit c5277d1

Browse files
committed
Use docker/login-action instead of docker login
1 parent 44e4f33 commit c5277d1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@ jobs:
9696
echo ::set-output name=push::${PUSH}
9797
echo ::set-output name=tags::${TAGS[@]}
9898
echo ::set-output name=build::true
99+
99100
- if: ${{ steps.prepare.outputs.build }} == 'true'
100101
name: Login into Docker Hub
101-
env:
102-
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
103-
run: |
104-
docker login --username "${{ steps.prepare.outputs.docker_username }}" --password ${DOCKER_HUB_PASSWORD}
102+
uses: docker/login-action@v1
103+
with:
104+
username: ruimarinho
105+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
105106

106107
- if: ${{ steps.prepare.outputs.build }} == 'true'
107108
name: Build Docker image
@@ -128,8 +129,3 @@ jobs:
128129
--build-arg "VCS_REF=${GITHUB_SHA::8}" \
129130
$(printf "%s" "${TAGS[@]/#/ --tag }" ) \
130131
${{ matrix.version }}/
131-
132-
- if: ${{ steps.prepare.outputs.build }} == 'true'
133-
name: Clear Docker credentials
134-
run: |
135-
rm -f ${HOME}/.docker/config.json

0 commit comments

Comments
 (0)