From 9db7d0af8da29ca2c7a47c7c70978f9493acd8f4 Mon Sep 17 00:00:00 2001 From: Quentin BEY Date: Fri, 5 Sep 2025 15:04:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F(all)=20refactor=20Docker?= =?UTF-8?q?=20Hub=20login=20to=20use=20official=20GitHub=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace custom Docker Hub authentication with standard, secure, official GitHub actions for improved security and maintainability. Uses officially supported actions that follow security best practices and receive regular updates from GitHub. Avoid unsecure handling of GitHub secrets. Thanks to @lebaudantoine --- .github/workflows/docker-hub.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 5971fcfa..1a99c7ce 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -32,7 +32,10 @@ jobs: - name: Login to DockerHub if: github.event_name != 'pull_request' - run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USER }}" --password-stdin + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Run trivy scan uses: numerique-gouv/action-trivy-cache@main @@ -65,7 +68,10 @@ jobs: - name: Login to DockerHub if: github.event_name != 'pull_request' - run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USER }}" --password-stdin + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Run trivy scan uses: numerique-gouv/action-trivy-cache@main