Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Docker login to Github bulid-and-push job #5

Merged
merged 19 commits into from
Sep 9, 2020
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ jobs:
steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@v2
- name: "Build and push docker image to DockerHub"
uses: docker/build-push-action@v2
- name: Login to DockerHub
if: github.event.pull_request.head.repo.full_name == github.repository
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: "Build and push docker image to DockerHub"
uses: docker/build-push-action@v2
danjbh marked this conversation as resolved.
Show resolved Hide resolved
with:
repository: ${{ github.repository }}
registry: registry-1.docker.io
tag_with_ref: true
danjbh marked this conversation as resolved.
Show resolved Hide resolved
push: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
tag_with_sha: true