From 3e606e9c1c530e6d5dde5399e076b0a291ffdcf0 Mon Sep 17 00:00:00 2001 From: Mark Harrison Date: Wed, 27 Sep 2023 16:13:54 +0100 Subject: [PATCH] Simplify docker hub login --- .github/workflows/octo.yml | 7 ++++--- .github/workflows/octopus-cli.yml | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/octo.yml b/.github/workflows/octo.yml index 7bea3b5..f38abd5 100644 --- a/.github/workflows/octo.yml +++ b/.github/workflows/octo.yml @@ -86,8 +86,8 @@ jobs: env: USERNAME: ${{ secrets.DOCKER_HUB_USER }} PASSWORD: ${{ secrets.DOCKER_HUB_PAT }} - run: | - docker login --username $USERNAME --password "$PASSWORD" + run: docker login --username $USERNAME --password "$PASSWORD" + if: ${{ needs.get-octo-cli-version.outputs.CONTINUE == 'Yes' }} - name: Build the alpine docker image env: @@ -113,7 +113,8 @@ jobs: USERNAME: ${{ secrets.DOCKER_HUB_USER }} PASSWORD: ${{ secrets.DOCKER_HUB_PAT }} run: docker login --username $USERNAME --password "$PASSWORD" - + if: ${{ needs.get-octo-cli-version.outputs.CONTINUE == 'Yes' }} + - name: Build manifests env: VERSION_NUMBER: ${{ needs.get-octo-cli-version.outputs.VERSION }} diff --git a/.github/workflows/octopus-cli.yml b/.github/workflows/octopus-cli.yml index 5478ea2..ab5dafd 100644 --- a/.github/workflows/octopus-cli.yml +++ b/.github/workflows/octopus-cli.yml @@ -84,8 +84,8 @@ jobs: env: USERNAME: ${{ secrets.DOCKER_HUB_USER }} PASSWORD: ${{ secrets.DOCKER_HUB_PAT }} - run: | - docker login --username $USERNAME --password "$PASSWORD" + run: docker login --username $USERNAME --password "$PASSWORD" + if: ${{ needs.get-octopus-cli-version.outputs.CONTINUE == 'Yes' }} # Build ubuntu images - name: Build the alpine docker image @@ -112,6 +112,7 @@ jobs: USERNAME: ${{ secrets.DOCKER_HUB_USER }} PASSWORD: ${{ secrets.DOCKER_HUB_PAT }} run: docker login --username $USERNAME --password "$PASSWORD" + if: ${{ needs.get-octopus-cli-version.outputs.CONTINUE == 'Yes' }} - name: Build manifests env: