Skip to content

⬆️ (dependencies): Update zgosalvez/github-actions-ensure-sha-pinned-actions action to v3.0.10 #397

⬆️ (dependencies): Update zgosalvez/github-actions-ensure-sha-pinned-actions action to v3.0.10

⬆️ (dependencies): Update zgosalvez/github-actions-ensure-sha-pinned-actions action to v3.0.10 #397

# Copyright 2024
#
# Everyone is permitted to copy, distribute, modify, merge, sell, publish,
# sublicense or whatever the fuck they want with this software but at their
# OWN RISK.
# The author has absolutely no fucking clue what the code in this project
# does. It might just fucking work or not, there is no third option.
#
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
---
name: 💚 Validate Instrastructure-as-code
on:
merge_group: {}
pull_request: {}
permissions: {}
jobs:
validate_infrastructure:
name: ✅ Validate Terraform configuration
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 🔍️ Verify if anything related to Terraform has changed
uses: tj-actions/verify-changed-files@6ed7632824d235029086612d4330d659005af687 # v20.0.1
id: verify-changed-files
with:
files: |
.github/workflows/merge_group,pull_request.terraform.validate.yaml
infrastructure/live/external/**
- name: 🚧 Setup Terraform
uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1
if: steps.verify-changed-files.outputs.files-changed == 'true'
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: ✅ Validate Terraform files
if: steps.verify-changed-files.outputs.files-changed == 'true'
run: |
terraform init
terraform validate
terraform fmt -check