From 33c4f85799a77394bd7c9bb82010f3acc0162e34 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 22 Feb 2024 14:14:21 -0500 Subject: [PATCH] specify registry and login consistently Signed-off-by: Justin Florentine --- .github/workflows/docker.yml | 2 +- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 14 ++++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 909b940bbda..8889b0dc7ad 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,7 +4,7 @@ on: types: - prereleased env: - registry: docker.com + registry: docker.io jobs: hadolint: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index fb67a0057b8..3defa71ab5a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -9,7 +9,7 @@ on: env: nightly-tag: develop - registry: docker.com + registry: docker.io jobs: hadolint: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1be195fb9ba..ceb8ba602cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,8 @@ on: workflow_dispatch: release: types: [released] +env: + registry: docker.io jobs: dockerPromoteX64: runs-on: ubuntu-22.04 @@ -13,11 +15,15 @@ jobs: distribution: 'temurin' # See 'Supported distributions' for available options java-version: '17' cache: gradle - - name: Login to DockerHub - run: echo '${{ secrets.DOCKER_PASSWORD_RW }}' | docker login -u '${{ secrets.DOCKER_USER_RW }}' --password-stdin + - name: login to ${{ env.registry }} + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d + with: + registry: ${{ env.registry }} + username: ${{ secrets.DOCKER_USER_RW }} + password: ${{ secrets.DOCKER_PASSWORD_RW }} - name: Setup Gradle uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1 - name: Docker upload - run: ./gradlew "-Prelease.releaseVersion=${{ github.ref_name }}" "-PdockerOrgName=${{ secrets.DOCKER_ORG }}" dockerUploadRelease + run: ./gradlew "-Prelease.releaseVersion=${{ github.ref_name }}" "-PdockerOrgName=${{ env.registry }}/${{ secrets.DOCKER_ORG }}" dockerUploadRelease - name: Docker manifest - run: ./gradlew "-Prelease.releaseVersion=${{ github.ref_name }}" "-PdockerOrgName=${{ secrets.DOCKER_ORG }}" manifestDockerRelease + run: ./gradlew "-Prelease.releaseVersion=${{ github.ref_name }}" "-PdockerOrgName=${{ env.registry }}/${{ secrets.DOCKER_ORG }}" manifestDockerRelease