From 3a20fa20ef9db4254572d065c80a33d9620c7e59 Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Mon, 2 Oct 2023 08:43:59 +0300 Subject: [PATCH 1/2] Update github workflows to use amazon-ecr-login v2 Fix mask password warning --- .github/actions/bootstrap-test-lakefs/action.yaml | 2 +- .github/workflows/docker-publish-lakefs-rclone-export.yaml | 2 +- .github/workflows/docker-publish.yaml | 2 +- .github/workflows/esti.yaml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/bootstrap-test-lakefs/action.yaml b/.github/actions/bootstrap-test-lakefs/action.yaml index fa8c68a6932..f7e459a0c2b 100644 --- a/.github/actions/bootstrap-test-lakefs/action.yaml +++ b/.github/actions/bootstrap-test-lakefs/action.yaml @@ -31,7 +31,7 @@ runs: aws-region: us-east-1 - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Start docker-compose env: LAKEFS_STATS_ENABLED: "false" diff --git a/.github/workflows/docker-publish-lakefs-rclone-export.yaml b/.github/workflows/docker-publish-lakefs-rclone-export.yaml index 75837bc90ac..24479f7a099 100644 --- a/.github/workflows/docker-publish-lakefs-rclone-export.yaml +++ b/.github/workflows/docker-publish-lakefs-rclone-export.yaml @@ -42,7 +42,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Login to DockerHub uses: docker/login-action@v2 diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 29cfebbe252..fece8349ae6 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -67,7 +67,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Login to DockerHub uses: docker/login-action@v2 diff --git a/.github/workflows/esti.yaml b/.github/workflows/esti.yaml index 051aa4b63b7..63de8ee75b0 100644 --- a/.github/workflows/esti.yaml +++ b/.github/workflows/esti.yaml @@ -95,7 +95,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -123,7 +123,7 @@ jobs: mask-aws-account-id: 'false' - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 outputs: registry: ${{ steps.login-ecr.outputs.registry }} docker_username: ${{ steps.login-ecr.outputs.docker_username_977611293394_dkr_ecr_us_east_1_amazonaws_com }} @@ -249,7 +249,7 @@ jobs: - name: Login to Amazon ECR id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 From 073092ce5aca9f942d1b5dd77c87f0c940d059a9 Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Tue, 3 Oct 2023 10:47:21 +0300 Subject: [PATCH 2/2] mask false to extract docker creds --- .github/workflows/esti.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/esti.yaml b/.github/workflows/esti.yaml index 63de8ee75b0..51c7d7bee96 100644 --- a/.github/workflows/esti.yaml +++ b/.github/workflows/esti.yaml @@ -110,6 +110,7 @@ jobs: type=s3,region=us-east-1,bucket=lakefs-docker-cache,name=lakefs cache-to: | type=s3,region=us-east-1,bucket=lakefs-docker-cache,name=lakefs,mode=max + login-to-amazon-ecr: runs-on: ubuntu-latest needs: [check-secrets] @@ -124,6 +125,8 @@ jobs: - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: 'false' outputs: registry: ${{ steps.login-ecr.outputs.registry }} docker_username: ${{ steps.login-ecr.outputs.docker_username_977611293394_dkr_ecr_us_east_1_amazonaws_com }}