From 6ed9c7751fc848bea0ee54a854b582d1d50f6821 Mon Sep 17 00:00:00 2001 From: Chris Tabone Date: Mon, 24 Jun 2024 16:12:02 -0300 Subject: [PATCH] Update self_runner_test.yml --- .github/workflows/self_runner_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/self_runner_test.yml b/.github/workflows/self_runner_test.yml index 24f12199..05509650 100644 --- a/.github/workflows/self_runner_test.yml +++ b/.github/workflows/self_runner_test.yml @@ -27,13 +27,13 @@ jobs: steps: - name: Log in to ECR env: - REG: "100225593120.dkr.ecr.us-east-1.amazonaws.com" AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: "us-east-1" run: | - if echo "${{ env.REG }}" | egrep "ecr\..+\.amazonaws\.com"; then - DOCKER_LOGIN_CMD="docker run --rm -v ~/.aws:/root/.aws amazon/aws-cli" - DOCKER_LOGIN_CMD="${DOCKER_LOGIN_CMD} ecr get-login-password --region us-east-1 | docker login -u AWS --password-stdin https://${{ env.REG }}" + if echo "100225593120.dkr.ecr.us-east-1.amazonaws.com" | egrep "ecr\..+\.amazonaws\.com"; then + DOCKER_LOGIN_CMD="docker run --rm -e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} -e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} -e AWS_DEFAULT_REGION=${{ env.AWS_DEFAULT_REGION }} amazon/aws-cli" + DOCKER_LOGIN_CMD="${DOCKER_LOGIN_CMD} ecr get-login-password --region $AWS_DEFAULT_REGION | docker login -u AWS --password-stdin https://100225593120.dkr.ecr.us-east-1.amazonaws.com" eval ${DOCKER_LOGIN_CMD} fi