-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: draft version * fix: update github workflow * terraform-docs: automated action --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8fafcf2
commit 5026a20
Showing
25 changed files
with
931 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine | ||
{ | ||
"name": "devcontainer", | ||
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04", | ||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/devcontainers/features/aws-cli:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/checkov:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/terraform:1": { | ||
"version": "1.5.0", | ||
"tflint": "0.47.0", | ||
"installTFsec": "true", | ||
"installTerraformDocs": "true" | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/pre-commit:2": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/terrascan:1": { | ||
"version": "latest" | ||
} | ||
}, | ||
"shutdownAction": "stopContainer", | ||
"postCreateCommand": { | ||
"one": "tflint --init" | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs | ||
# For more information about the EditorConfig project, see http://editorconfig.org/ | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
max_line_length = 80 | ||
trim_trailing_whitespace = true | ||
|
||
# Indentation and spacing | ||
[*.tf] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
# Ignore files generated by Terraform | ||
[*.tfstate] | ||
[*.tfstate.*] | ||
[*.tfvars] | ||
[*.tfvars.*] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: pr-checks | ||
on: | ||
- pull_request | ||
|
||
permissions: | ||
contents: read | ||
issues: read | ||
pull-requests: read | ||
checks: read | ||
|
||
jobs: | ||
check_pull_request_type: | ||
name: Check for pull request type label | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
one_of: bug,enhancement,documentation,security | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: tf-module-actions | ||
on: | ||
- pull_request | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
issues: write | ||
checks: write | ||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Render terraform docs inside the README.md and push changes back to PR branch | ||
uses: terraform-docs/[email protected] | ||
with: | ||
working-dir: .,examples/01_default_configuration | ||
output-file: README.md | ||
output-method: inject | ||
git-push: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Release | ||
uses: cycjimmy/semantic-release-action@v3 | ||
with: | ||
semantic_version: 18.0.0 | ||
extra_plugins: | | ||
@semantic-release/[email protected] | ||
@semantic-release/[email protected] | ||
[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Local .terraform directories | ||
**/.terraform/* | ||
|
||
# .tfstate files | ||
*.tfstate | ||
*.tfstate.* | ||
|
||
# Terraform lock files | ||
*.lock.hcl | ||
|
||
# Crash log files | ||
crash.log | ||
|
||
# Ignore override files as they are usually used to override resources locally and so are not checked in | ||
override.tf | ||
override.tf.json | ||
*_override.tf | ||
*_override.tf.json | ||
|
||
# Ignore CLI configuration files | ||
.terraformrc | ||
terraform.rc | ||
|
||
# VSCode History plugin | ||
.history | ||
|
||
# Python virtual environment | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
repos: | ||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.83.2 | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_validate | ||
- id: terraform_docs | ||
args: | ||
- '--args=--lockfile=false' | ||
- id: terraform_tflint | ||
args: | ||
- '--args=--only=terraform_deprecated_interpolation' | ||
- '--args=--only=terraform_deprecated_index' | ||
- '--args=--only=terraform_unused_declarations' | ||
- '--args=--only=terraform_comment_syntax' | ||
- '--args=--only=terraform_documented_outputs' | ||
- '--args=--only=terraform_documented_variables' | ||
- '--args=--only=terraform_typed_variables' | ||
- '--args=--only=terraform_module_pinned_source' | ||
- '--args=--only=terraform_naming_convention' | ||
- '--args=--only=terraform_required_version' | ||
- '--args=--only=terraform_required_providers' | ||
- '--args=--only=terraform_standard_module_structure' | ||
- '--args=--only=terraform_workspace_remote' | ||
- id: terraform_checkov | ||
args: | ||
- --args=--quiet | ||
- --args=--skip-check CKV_AWS_116,CKV_AWS_117,CKV_AWS_173,CKV_AWS_272 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
branches: | ||
- main | ||
|
||
ci: false | ||
|
||
plugins: | ||
- "@semantic-release/commit-analyzer" | ||
- "@semantic-release/release-notes-generator" | ||
- "@semantic-release/github" | ||
|
||
verifyConditions: | ||
- '@semantic-release/git' | ||
- "@semantic-release/github" | ||
analyzeCommits: | ||
- path: "@semantic-release/commit-analyzer" | ||
releaseRules: | ||
- type: "feat" | ||
release: "patch" | ||
- type: "hotfix" | ||
release: "patch" | ||
- type: "patch" | ||
release: "patch" | ||
- type: "minor" | ||
release: "minor" | ||
- type: "breaking" | ||
release: "major" | ||
generateNotes: | ||
- path: "@semantic-release/release-notes-generator" | ||
writerOpts: | ||
groupBy: "type" | ||
commitGroupsSort: | ||
- "feat" | ||
- "perf" | ||
- "fix" | ||
commitsSort: "header" | ||
types: | ||
- type: "feat" | ||
- section: "Features" | ||
# Tracked bug fix with a hotfix branch | ||
- type: "hotfix" | ||
- section: "Bug Fixes" | ||
# Uninmportent fix (CI testing, etc) | ||
- type: "fix" | ||
- hidden: true | ||
- type: "chore" | ||
- hidden: true | ||
- type: "docs" | ||
- hidden: true | ||
- type: "doc" | ||
- hidden: true | ||
- type: "style" | ||
- hidden: true | ||
- type: "refactor" | ||
- hidden: true | ||
- type: "perf" | ||
- hidden: true | ||
- type: "test" | ||
- hidden: true | ||
presetConfig: true | ||
prepare: | ||
- path: "@semantic-release/git" | ||
- path: "@semantic-release/changelog" | ||
changelogFile: "docs/CHANGELOG.md" | ||
publish: | ||
- path: "@semantic-release/github" | ||
|
||
success: | ||
- "@semantic-release/github" | ||
|
||
fail: | ||
- "@semantic-release/github" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
formatter: "markdown table" | ||
sort: | ||
enabled: true | ||
by: name | ||
|
||
output: | ||
file: README.md | ||
mode: inject |
Oops, something went wrong.