Skip to content

Commit

Permalink
Add self referencing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thepoppingone committed Sep 18, 2023
1 parent 4ff78b2 commit b14889b
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/autoupdate-pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pre-commit auto-update

on:
# every sunday at midnight
schedule:
- cron: "0 0 * * 0"
# on demand
workflow_dispatch:

permissions:
actions: read
checks: read
contents: write #require this to write to repo
pull-requests: write #require this to create PR

jobs:
auto-update:
runs-on:
- self-hosted
- platform-eng-ent
steps:
- uses: SPHTech-Platform/gha-pre-commit-autoupdate@main
name: Update pre-commit config automatically
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/autoupdate-tflint-aws-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pre-commit auto-update

on:
# every sunday at midnight
schedule:
- cron: "0 0 * * 0"
# on demand
workflow_dispatch:

permissions:
actions: read
checks: read
contents: write #require this to write to repo
pull-requests: write #require this to create PR

jobs:
auto-update:
runs-on:
- self-hosted
- platform-eng-ent
steps:
- uses: SPHTech-Platform/gha-tflint-aws-plugin-autoupdate@main
name: Update tflint aws plugin automatically
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 59 additions & 0 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
plugin "aws" {
enabled = true
version = "0.23.1"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}

rule "terraform_deprecated_interpolation" {
enabled = true
}

rule "terraform_documented_outputs" {
enabled = true
}

rule "terraform_documented_variables" {
enabled = true
}

rule "terraform_module_pinned_source" {
enabled = true
}

rule "terraform_typed_variables" {
enabled = true
}

rule "terraform_required_version" {
enabled = false
}

rule "terraform_required_providers" {
enabled = true
}

rule "terraform_standard_module_structure" {
enabled = false
}

rule "terraform_unused_declarations" {
enabled = true
}

rule "terraform_unused_required_providers" {
enabled = true
}

# rule "aws_resource_missing_tags" {
# enabled = true
# tags = [
# "cost-cen",
# "env",
# "owner",
# "hello",
# ]
# }

rule "terraform_naming_convention" {
enabled = true
}

0 comments on commit b14889b

Please sign in to comment.