Skip to content

Commit

Permalink
scaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Oloruntobi Olurombi committed Aug 27, 2024
1 parent 2933d3a commit 6d5c3ec
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/eks-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

- name: Check EC2 Public IP
run: echo ${{ env.EC2_PUBLIC_IP }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

- name: Get EC2 Public IP
id: get_public_ip
run: echo "EC2_PUBLIC_IP=$(terraform output -raw ec2_public_ip)" >> $GITHUB_ENV
Expand All @@ -78,11 +85,13 @@ jobs:
AWS_REGION: ${{ secrets.AWS_REGION }}

- name: Setup SSH Key
run: echo "${{ secrets.EC2_SSH_PRIVATE_KEY }}" > /tmp/private_key && chmod 600 /tmp/private_key
run: |
echo "${{ secrets.EC2_SSH_PRIVATE_KEY }}" > /tmp/private_key
chmod 600 /tmp/private_key
- name: SSH and Install AWS CLI and kubectl
run: |
ssh -o StrictHostKeyChecking=no -i /tmp/private_key ec2-user@${{ env.EC2_PUBLIC_IP }} << EOF
ssh -o StrictHostKeyChecking=no -i /tmp/private_key ec2-user@${{ env.EC2_PUBLIC_IP }} << 'EOF'
sudo yum install -y unzip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
Expand All @@ -97,8 +106,4 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}




AWS_REGION: ${{ secrets.AWS_REGION }}

0 comments on commit 6d5c3ec

Please sign in to comment.