Skip to content

Commit

Permalink
Update self_runner_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
christabone authored Jun 24, 2024
1 parent cc5280a commit 6ed9c77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/self_runner_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ed9c77

Please sign in to comment.