Skip to content

Commit

Permalink
add docker login action (#354)
Browse files Browse the repository at this point in the history
* add docker login action

Signed-off-by: sbadiger <[email protected]>

* Update .github/workflows/ci.yaml

Co-authored-by: Venkata Gunapati <[email protected]>
Signed-off-by: sbadiger <[email protected]>

* fix indetation

Signed-off-by: sbadiger <[email protected]>

---------

Signed-off-by: sbadiger <[email protected]>
Co-authored-by: Venkata Gunapati <[email protected]>
  • Loading branch information
shreyas-badiger and vgunapati authored Jul 14, 2023
1 parent 952b2df commit 204f08a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,24 @@ jobs:
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)

- name: Docker build
if: github.event_name == 'pull_request' || (github.repository != 'keikoproj/upgrade-manager' && github.event_name == 'push')
run: make docker-build

- name: Set up Docker Buildx
if: (github.event_name == 'push' || github.event_name == 'release') && github.repository == 'keikoproj/upgrade-manager'
id: buildx
uses: docker/setup-buildx-action@v2
with:
install: true

- name: Docker build
if: github.event_name == 'pull_request' || (github.repository != 'keikoproj/upgrade-manager' && github.event_name == 'push')
run: make docker-build

- name: Login to DockerHub
if: (github.event_name == 'push' || github.event_name == 'release') && github.repository == 'keikoproj/upgrade-manager'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image with tag master # only on pushes to keikoproj/upgrade-manager
if: github.event_name == 'push' && github.repository == 'keikoproj/upgrade-manager'
Expand Down

0 comments on commit 204f08a

Please sign in to comment.