From d355517f06622df3bfa8c52fddf845f1d4f37580 Mon Sep 17 00:00:00 2001 From: Douglas Quintanilha Date: Sun, 16 Aug 2020 22:09:30 -0300 Subject: [PATCH] Adds login step to github actions --- .github/workflows/docker-build-push.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 3f8d436..0e668fb 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -16,6 +16,8 @@ jobs: run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) - name: Build the Docker image run: docker build . --file Dockerfile --tag douglasq/kubectl:latest + - name: Login to DockerHub Registry + run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - name: Push the latest Docker image run: docker push douglasq/kubectl:latest - name: Tag the Docker image @@ -30,8 +32,8 @@ jobs: # steps: # - uses: actions/checkout@v2 # may be actions/checkout@v2 now -# - name: Login to DockerHub Registry -# run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + # - name: Login to DockerHub Registry + # run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin # - name: Get the version # id: vars # run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})