Skip to content

Commit

Permalink
restructure ci-cd workflow jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Oloruntobi Olurombi committed Aug 26, 2024
1 parent fc0d20b commit 6eb0e83
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions .github/workflows/eks-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,55 +30,27 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

TerraformPlan:
runs-on: ubuntu-latest
needs: TerraformInit

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Plan Terraform
run: |
terraform plan
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 }}

TerraformValidate:
runs-on: ubuntu-latest
needs: TerraformPlan

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Validate Terraform
run: |
terraform validate
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

TerraformApply:
runs-on: ubuntu-latest
needs: TerraformValidate

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Plan Terraform
run: |
terraform apply
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 6eb0e83

Please sign in to comment.