Skip to content

chore: Update GKE credentials setup and location in gc.yaml #28

chore: Update GKE credentials setup and location in gc.yaml

chore: Update GKE credentials setup and location in gc.yaml #28

Workflow file for this run

name: Deploy to EKS
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }}
aws-region: us-east-1
- name: Update kube config
run: aws eks update-kubeconfig --name carlohcs-k8s-cluster --region us-east-1
- name: Login to DockerHub
run: docker login -u carlohcs -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
run: |
docker build -t carlohcs/kubernetes-ci-cd-github-actions .
docker push carlohcs/kubernetes-ci-cd-github-actions
- name: Deploy to EKS
run: |
kubectl apply -f k8s/node-deployment.yaml
kubectl apply -f k8s/node-service.yaml