Skip to content

Instantly share code, notes, and snippets.

@vtj-ttanaka
Created June 2, 2023 06:38
Show Gist options
  • Save vtj-ttanaka/c9513f6c291a72ebf44192fc99e43521 to your computer and use it in GitHub Desktop.
Save vtj-ttanaka/c9513f6c291a72ebf44192fc99e43521 to your computer and use it in GitHub Desktop.
name: deploy to eks
on:
push:
branches:
- main
paths:
- 'manifest/**'
- .github/workflows/deploy.yaml
jobs:
deploy-to-eks:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Kubectl tool installer
uses: Azure/setup-kubectl@v3
- name: Configure AWS Credentials For GitHub Actions
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ vars.assume_role }}
aws-region: ${{ vars.aws_region }}
- name: Update KUBECONFIG
run: aws eks update-kubeconfig --name ${{ vars.cluster_name }}
- name: Deploy to EKS
run: kubectl apply -k manifest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment