ddns update + secret template #172
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: 'Deployment terraform plan and apply' | |
on: | |
push: | |
branches: | |
- main | |
- after-hours | |
permissions: | |
contents: read | |
jobs: | |
terraform: | |
name: Terraform fmt, init, plan and apply | |
runs-on: ubuntu-latest | |
environment: production | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v2 | |
with: | |
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | |
- name: Terraform Format | |
id: fmt | |
run: terraform fmt | |
working-directory: terraform | |
continue-on-error: false | |
- name: Terraform Init | |
id: init | |
working-directory: terraform | |
run: terraform init | |
- name: Terraform Validate | |
id: validate | |
working-directory: terraform | |
run: terraform validate -no-color | |
- name: Terraform Plan | |
id: plan | |
working-directory: terraform | |
run: terraform plan -no-color | |
continue-on-error: false | |
- name: Terraform Apply | |
working-directory: terraform | |
run: terraform apply -auto-approve -input=false |