From 5db686978a4efdcf5446ba578e4c5b264b0d3de8 Mon Sep 17 00:00:00 2001 From: Jarrod Lowe Date: Sat, 3 Aug 2024 17:02:29 +1200 Subject: [PATCH] First workflow --- .github/workflows/terraform.yaml | 22 ++++++++++++++++++++++ README.md | 2 +- terraform/environment/github/main.tf | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/terraform.yaml create mode 100644 terraform/environment/github/main.tf diff --git a/.github/workflows/terraform.yaml b/.github/workflows/terraform.yaml new file mode 100644 index 00000000..811a8515 --- /dev/null +++ b/.github/workflows/terraform.yaml @@ -0,0 +1,22 @@ +name: Terraform Validation + +on: + pull_request: + paths: + - terraform/environment/github/** + push: + branches: + - main + +jobs: + terraform: + name: Validate Terraform + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: action/checkout@v4 + - name: Validate Terraform + uses: dflook/terraform-validate@v1 + with: + path: terraform/environment/github + \ No newline at end of file diff --git a/README.md b/README.md index 1904aa07..293b4a36 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ Wildsea companion app To set up a github repository: * Log into Codacy, and connect the repo + * Configure the rule to maximum * Create a branch restriction rule called "main": * Enforcement: Active * Target Branches: Include default branch * Tick Restrict creations - * Tick Restrict updates * Tick Restrict deletions * Tick Require linear history * Tick Require a pull request before merging diff --git a/terraform/environment/github/main.tf b/terraform/environment/github/main.tf new file mode 100644 index 00000000..15731b42 --- /dev/null +++ b/terraform/environment/github/main.tf @@ -0,0 +1 @@ +resource "null_resource" "test" {}