Skip to content

Dart sass

Dart sass #151

name: Run Terraform plan in staging
on:
pull_request:
branches: [ main ]
permissions:
contents: read
pull-requests: write
jobs:
terraform:
name: Terraform plan
runs-on: ubuntu-24.04
environment: staging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: terraform validate
uses: dflook/terraform-validate@v1
with:
path: terraform
- name: terraform fmt
uses: dflook/terraform-fmt-check@v1
with:
path: terraform
- name: Compile assets
uses: ./.github/actions/compile-assets
with:
rails_env: staging
fail_on_missing_cache: true
- name: terraform plan
uses: dflook/terraform-plan@v1
env:
TF_VAR_cf_user: ${{ secrets.CF_USERNAME }}
TF_VAR_cf_password: ${{ secrets.CF_PASSWORD }}
TF_VAR_rails_master_key: ${{ secrets.RAILS_MASTER_KEY }}
TERRAFORM_PRE_RUN: |
apt-get update
apt-get install -y zip
with:
path: terraform
var_file: terraform/staging.tfvars
add_github_comment: changes-only
backend_config: >
access_key=${{ secrets.TERRAFORM_STATE_ACCESS_KEY }}
secret_key=${{ secrets.TERRAFORM_STATE_SECRET_ACCESS_KEY }}
bucket=${{ secrets.TERRAFORM_STATE_BUCKET_NAME }}
key=terraform.tfstate.staging
- name: Save app zip
uses: actions/upload-artifact@v4
with:
name: app-src-plan
path: terraform/dist/src.zip
compression-level: 0
retention-days: 1