Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
github-actions:
patterns: ["*"]

- package-ecosystem: "terraform"
directory: "/"
schedule:
interval: "weekly"

# base images of the function's build
- package-ecosystem: "docker"
directory: "/assets/lambda-function"
schedule:
interval: "weekly"
21 changes: 15 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,32 @@ on:
permissions:
contents: write

concurrency:
group: release
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0

uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Bump Version
id: tag_version
uses: mathieudutour/github-tag-action@d28fa2ccfbd16e871a4bdf35e11b3ad1bd56c0c1 # v6.2
uses: mathieudutour/github-tag-action@af99e60ce8132224b8e6ebab5023449fe256ed46 # v7.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: minor
custom_release_rules: bug:patch:Fixes,chore:patch:Chores,docs:patch:Documentation,feat:minor:Features,refactor:minor:Refactors,test:patch:Tests,ci:patch:Development,dev:patch:Development

# a custom rule that matches a commit's type wins over the default
# "breaking change -> major" rule, so types that carry breaking
# changes (feat, fix, refactor) must not be listed here. feat and
# fix use the default rules, and refactor uses default_bump.
custom_release_rules: bug:patch:Fixes,chore:patch:Chores,docs:patch:Documentation,test:patch:Tests,ci:patch:Development,dev:patch:Development
- name: Create Release
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
if: steps.tag_version.outputs.new_tag != ''
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/semantic-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ jobs:
name: Semantic Commit Message Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Check PR for Semantic Commit Message
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
- uses: amannn/action-semantic-pull-request@2252a14e810aa9b85c2d560bd7070c802206ecf6 # v6.1.2
name: Check PR for Semantic Commit Message
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
71 changes: 23 additions & 48 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,36 @@ name: test

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

permissions:
contents: read
checks: write
pull-requests: write

env:
TF_IN_AUTOMATION: true

jobs:
lint:
name: lint
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Setup Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
- name: Cache Terraform Plugins
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
- name: Checkout Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: ${{ runner.temp }}/.terraform.d/plugin-cache
key: tf-plugins-${{ runner.os }}-${{ hashFiles('**/.terraform.lock.hcl') }}
- name: Initialize Terraform
run: terraform init
- name: Suggest Terraform Format
if: github.event_name == 'pull_request'
uses: reviewdog/action-suggester@fc4b06f8697e1e66bd66703f660005079be0b3dc # v1.24.0
with:
tool_name: terraform-fmt
level: warning
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_level: error
- name: Check Terraform Format
if: github.event_name == 'push'
run: terraform fmt -recursive -check
- name: Validate Terraform
uses: reviewdog/action-terraform-validate@6f4d41dfe9cf0c095aec3d341110eadb4c90c360 # v1.16.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: warning
fail_level: error
# - name: Lint Terraform
# uses: reviewdog/action-tflint@9cbfc0aeae4af75fb73e8d5b6efbcd82e9483532 # v1.25.0
# with:
# reporter: github-pr-review
# filter_mode: nofilter
# fail_level: error
- name: Lint GitHub Actions
uses: reviewdog/action-actionlint@2ca4336c1821eaff87db1f72fd3923b3250e0427 # v1.69.0
persist-credentials: false
- name: Setup Terraform
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
- name: Terraform Setup
run: terraform init -backend=false
- name: Terraform Format
run: terraform fmt -check -recursive
- name: Terraform Validate
run: terraform validate
- name: Terraform Test
run: terraform test
- name: Validate Example
run: |
terraform -chdir=examples/complete init -backend=false
terraform -chdir=examples/complete validate
- name: Lint Terraform
uses: reviewdog/action-tflint@8de8f6134bd8068970d7261f6b831964df82b92c # v1.29.0
with:
reporter: github-pr-check
fail_level: error
filter_mode: nofilter
github_token: ${{ secrets.github_token }}
filter_mode: "nofilter"
13 changes: 8 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,28 @@ override.tf.json
*_override.tf
*_override.tf.json

# Crash log files
# crash log files
crash.log
crash.*.log

# IDE
# ide
.idea/
.vscode/
*.swp
*.swo
*~

# OS
# os
.DS_Store
Thumbs.db

# Environment variables
# environment variables
.env
.env.local

# Build artifacts
# build artifacts
dist/
*.zip

# worktrees
.worktrees/
8 changes: 8 additions & 0 deletions .tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config {
call_module_type = "all"
}

plugin "terraform" {
enabled = true
preset = "recommended"
}
Loading
Loading