Skip to content

Commit

Permalink
Adds login step to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas Quintanilha committed Aug 17, 2020
1 parent 31a2f01 commit d355517
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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})
Expand Down

0 comments on commit d355517

Please sign in to comment.