Manifest updated for litmus-docs #110
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: deploy-pipeline | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| jobs: | |
| filters: | |
| runs-on: ubuntu-latest | |
| # Set job outputs to values from filter step | |
| outputs: | |
| aws-infra: ${{ steps.filter.outputs.aws-infra }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| # For pull requests it's not necessary to checkout the code | |
| - uses: dorny/paths-filter@v2 | |
| id: filter | |
| with: | |
| filters: | | |
| aws-infra: | |
| - 'aws-infra/**' | |
| deploy-aws-infra: | |
| runs-on: ubuntu-latest | |
| needs: filters | |
| if: needs.filters.outputs.aws-infra == 'true' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Configure AWS credentials for LitmusChaos Production | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ secrets.PROD_EKS_REGION }} | |
| - name: Install Terraform | |
| uses: hashicorp/setup-terraform@v1 | |
| with: | |
| terraform_wrapper: false | |
| - name: Terraform Version | |
| run: terraform version | |
| - name: Terraform Init | |
| run: | | |
| cd aws-infra/ | |
| terraform init | |
| - name: Terraform Plan | |
| run: | | |
| cd aws-infra/ | |
| terraform plan | |
| - name: Terraform Apply | |
| run: | | |
| cd aws-infra/ | |
| terraform apply -auto-approve |