From 6f14e9c764aed42ffb9997927b2aa696536b4669 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 22 Dec 2024 20:02:03 +0100 Subject: [PATCH] Login to docker in the scan workflow (#350) Fixes https://github.com/pulumi/pulumi-docker-containers/issues/349 --- .github/workflows/snyk-scan.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/snyk-scan.yml b/.github/workflows/snyk-scan.yml index c1d9f70..9799a8a 100644 --- a/.github/workflows/snyk-scan.yml +++ b/.github/workflows/snyk-scan.yml @@ -10,6 +10,7 @@ on: env: DOCKER_ORG: pulumi + DOCKER_USERNAME: pulumibot DISPATCH_REF: ${{ github.event.client_payload.ref }} jobs: @@ -27,6 +28,11 @@ jobs: uses: jlumbroso/free-disk-space@main with: tool-cache: false + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ env.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Set version run: | [ -z "${{ env.DISPATCH_REF }}" ] && echo "PULUMI_VERSION=$(curl https://www.pulumi.com/latest-version)" >> $GITHUB_ENV || echo "PULUMI_VERSION=${{ env.DISPATCH_REF }}" >> $GITHUB_ENV @@ -54,6 +60,11 @@ jobs: uses: jlumbroso/free-disk-space@main with: tool-cache: false + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ env.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Set version run: | [ -z "${{ env.DISPATCH_REF }}" ] && echo "PULUMI_VERSION=$(curl https://www.pulumi.com/latest-version)" >> $GITHUB_ENV || echo "PULUMI_VERSION=${{ env.DISPATCH_REF }}" >> $GITHUB_ENV @@ -83,6 +94,11 @@ jobs: arch: ["arm64", "amd64"] steps: - uses: actions/checkout@master + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ env.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Set version run: | [ -z "${{ env.DISPATCH_REF }}" ] && echo "PULUMI_VERSION=$(curl https://www.pulumi.com/latest-version)" >> $GITHUB_ENV || echo "PULUMI_VERSION=${{ env.DISPATCH_REF }}" >> $GITHUB_ENV @@ -122,6 +138,11 @@ jobs: matrix: ${{ fromJSON(needs.define-debian-matrix.outputs.matrix) }} steps: - uses: actions/checkout@master + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ env.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Set version run: | [ -z "${{ env.DISPATCH_REF }}" ] && echo "PULUMI_VERSION=$(curl https://www.pulumi.com/latest-version)" >> $GITHUB_ENV || echo "PULUMI_VERSION=${{ env.DISPATCH_REF }}" >> $GITHUB_ENV @@ -153,6 +174,11 @@ jobs: sdk: ["nodejs", "python", "dotnet", "go"] steps: - uses: actions/checkout@master + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ env.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Set version run: | [ -z "${{ env.DISPATCH_REF }}" ] && echo "PULUMI_VERSION=$(curl https://www.pulumi.com/latest-version)" >> $GITHUB_ENV || echo "PULUMI_VERSION=${{ env.DISPATCH_REF }}" >> $GITHUB_ENV