Skip to content

Commit

Permalink
change workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ajithvcoder committed Nov 4, 2024
1 parent 948d482 commit 594a94f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ec2-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,15 @@ jobs:
hostname
whoami
pwd
apt-get update
apt-get install awscli
# Install the AWS CLI if not already available
if ! command -v aws &> /dev/null; then
apt-get update
apt-get install -y awscli
fi

# Get ECR login command and execute it
$(aws ecr get-login --no-include-email --region $AWS_REGION)
aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin 306093656765.dkr.ecr.ap-south-1.amazonaws.com

- name: Set up AWS CLI credentials
env:
Expand Down

0 comments on commit 594a94f

Please sign in to comment.