Merge pull request #5 from Decatur-Robotics/save-tf-state #4
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: Apply Terraform | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
terraform-validate: | |
uses: ./.github/workflows/validate.yml | |
terraform-apply: | |
runs-on: ubuntu-latest | |
needs: terraform-validate | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/checkout@v2 | |
- name: Terraform Apply | |
uses: dflook/terraform-apply@61432ffb5b94226bdfc9cd68a1702a2c40e0db8b | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
name: Increment Version | |
- name: Set name | |
run: git config user.name "Gearbox Bot" | |
- name: Set email | |
run: git config user.email "[email protected]" | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.head_ref }} |