valiantlynx is deploying πππ #51
This file contains 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 | |
run-name: ${{ github.actor }} is deploying πππ | |
# Define a concurrency group to ensure only one workflow runs at a time | |
concurrency: | |
group: deploy_group | |
cancel-in-progress: false | |
on: | |
repository_dispatch: | |
types: [image_pushed] | |
workflow_dispatch: | |
env: | |
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
jobs: | |
build-infra: | |
name: terraform-ci-cd | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v2 | |
- name: Terraform Init | |
id: init | |
run: terraform init | |
working-directory: ./terraform | |
- name: Terraform Validate | |
id: validate | |
run: terraform validate | |
working-directory: ./terraform | |
- name: Terraform Plan | |
id: plan | |
run: terraform plan | |
working-directory: ./terraform | |
- name: Terraform Apply | |
id: apply | |
run: terraform apply --auto-approve | |
working-directory: ./terraform |