Skip to content

Commit bcf4e65

Browse files
Update build.yml
1 parent 2060d2e commit bcf4e65

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ jobs:
2828
run: |
2929
echo "${{ secrets.AWS_ACCESS_KEY_ID }}" > aws_access_key_id
3030
echo "${{ secrets.AWS_SECRET_ACCESS_KEY }}" > aws_secret_access_key
31+
- name: Set AWS Region
32+
run: |
33+
echo "AWS_REGION=us-east-1" >> $GITHUB_ENV # Replace with your AWS region
3134
- name: Deploy to EKS
3235
run: |
3336
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
3437
chmod +x ./kubectl
3538
sudo mv ./kubectl /usr/local/bin/kubectl
3639
pip install awscli --upgrade
3740
aws --version
38-
aws eks update-kubeconfig --name my-cluster
41+
aws eks update-kubeconfig --name my-cluster --region ${{ env.AWS_REGION }}
3942
LATEST_SHA=$(git rev-parse HEAD)
4043
docker build -t express-eks:$LATEST_SHA .
4144
docker tag express-eks:$LATEST_SHA ${{ secrets.IMAGE_REGISTRY }}/express-eks:$LATEST_SHA

0 commit comments

Comments
 (0)