We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 948d482 commit 594a94fCopy full SHA for 594a94f
.github/workflows/ec2-pipeline.yml
@@ -68,8 +68,15 @@ jobs:
68
hostname
69
whoami
70
pwd
71
- apt-get update
72
- apt-get install awscli
+ # Install the AWS CLI if not already available
+ if ! command -v aws &> /dev/null; then
73
+ apt-get update
74
+ apt-get install -y awscli
75
+ fi
76
+
77
+ # Get ECR login command and execute it
78
+ $(aws ecr get-login --no-include-email --region $AWS_REGION)
79
+ aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin 306093656765.dkr.ecr.ap-south-1.amazonaws.com
80
81
- name: Set up AWS CLI credentials
82
env:
0 commit comments