From 847408b8be3d510c7e241f11e8c4657fa00bc482 Mon Sep 17 00:00:00 2001 From: Julien Duchesne Date: Tue, 30 Jan 2024 09:49:43 -0500 Subject: [PATCH] Github Actions: Use shared action to login to DockerHub (#991) --- .github/workflows/docker.yml | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 061cf2b9e..82d6b4378 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -49,22 +49,9 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - # Login to Docker Hub - - name: Get Secrets + - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: grafana/shared-workflows/actions/get-vault-secrets@main - with: - # Secrets placed in the ci/common/ path in Vault - common_secrets: | - DOCKERHUB_USERNAME=dockerhub:username - DOCKERHUB_TOKEN=dockerhub:password - - - name: Login to Docker Hub - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - username: ${{ env.DOCKERHUB_USERNAME }} - password: ${{ env.DOCKERHUB_TOKEN }} + uses: grafana/shared-workflows/actions/dockerhub-login@main - name: Build and push by digest id: build @@ -127,19 +114,8 @@ jobs: images: ${{ env.REGISTRY_IMAGE }} tags: ${{ env.TAGS_CONFIG }} - # Login to Docker Hub - - name: Get Secrets - uses: grafana/shared-workflows/actions/get-vault-secrets@main - with: - # Secrets placed in the ci/common/ path in Vault - common_secrets: | - DOCKERHUB_USERNAME=dockerhub:username - DOCKERHUB_TOKEN=dockerhub:password - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ env.DOCKERHUB_USERNAME }} - password: ${{ env.DOCKERHUB_TOKEN }} + - name: Login to DockerHub + uses: grafana/shared-workflows/actions/dockerhub-login@main - name: Create manifest list and push working-directory: /tmp/digests