From 633bcf094d17848e5b1db188a5cba4edc0dc0946 Mon Sep 17 00:00:00 2001 From: Quentin BEY Date: Fri, 5 Sep 2025 14:52:50 +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=20Repla?= =?UTF-8?q?ce=20custom=20Docker=20Hub=20authentication=20with=20standard,?= =?UTF-8?q?=20secure,=20official=20GitHub=20actions=20for=20improved=20sec?= =?UTF-8?q?urity=20and=20maintainability.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 fa33e2d..f63a5f4 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -35,7 +35,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 @@ -71,7 +74,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