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