From d2a54b67bddb40d3f30b4ba4c1d0041ffcfa0e95 Mon Sep 17 00:00:00 2001 From: sbadiger Date: Thu, 13 Jul 2023 15:35:47 -0700 Subject: [PATCH 1/3] add docker login action Signed-off-by: sbadiger --- .github/workflows/ci.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e1e9a66d..c48b9e2f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -49,6 +49,10 @@ 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' @@ -56,10 +60,12 @@ jobs: 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 + 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' From 32307f5020d1f30baf31209a19f295e391e53a0d Mon Sep 17 00:00:00 2001 From: Shreyas Badiger <7680410+shreyas-badiger@users.noreply.github.com> Date: Fri, 14 Jul 2023 16:40:06 -0700 Subject: [PATCH 2/3] Update .github/workflows/ci.yaml Co-authored-by: Venkata Gunapati Signed-off-by: sbadiger --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c48b9e2f..951f4de7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,6 +62,7 @@ jobs: install: true - 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 }} From 9a6150895362cb5b9f769048bcc141f13674faa2 Mon Sep 17 00:00:00 2001 From: sbadiger Date: Fri, 14 Jul 2023 16:45:23 -0700 Subject: [PATCH 3/3] fix indetation Signed-off-by: sbadiger --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 951f4de7..9d35ccb5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,7 +62,7 @@ jobs: install: true - name: Login to DockerHub - if: (github.event_name == 'push' || github.event_name == 'release') && github.repository == 'keikoproj/upgrade-manager' + if: (github.event_name == 'push' || github.event_name == 'release') && github.repository == 'keikoproj/upgrade-manager' uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }}