From 54a90af64b083121b2058cd872c86601640f741f Mon Sep 17 00:00:00 2001 From: Mike McKiernan Date: Thu, 1 Feb 2024 15:14:33 -0500 Subject: [PATCH] Use the Docker login action Signed-off-by: Mike McKiernan --- .github/workflows/docs-build.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-build.yaml b/.github/workflows/docs-build.yaml index cddad17e1..a2b50aa5b 100644 --- a/.github/workflows/docs-build.yaml +++ b/.github/workflows/docs-build.yaml @@ -34,11 +34,16 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 2 + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Detect change id: change run: | export COMMIT_SHORT_SHA="${GITHUB_SHA:0:8}" - echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u "${{ github.actor }}" --password-stdin "${{env.REGISTRY}}" if ! docker manifest inspect "${REGISTRY}/${IMAGE_NAME}:${TAG}" 2>&1 > /dev/null ; then export NEEDS_IMAGE=true ; fi def_branch=$(gh api "repos/${GITHUB_REPOSITORY}" -q '.default_branch') git fetch origin "${def_branch}" @@ -70,7 +75,7 @@ jobs: with: fetch-depth: 1 - name: Log in to Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }}