Skip to content

Commit cb6c57c

Browse files
Merge pull request #1 from voidsolutionsorg/as/ci/init
ci: Added
2 parents 51521bf + 95bd521 commit cb6c57c

File tree

8 files changed

+281
-14
lines changed

8 files changed

+281
-14
lines changed

.github/dependabot.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "terraform"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Validate PR commit messages
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
jobs:
8+
commitlint:
9+
name: Validate commit messages
10+
runs-on: ubuntu-latest
11+
permissions:
12+
pull-requests: read
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: lts/*
22+
23+
- name: Install commitlint
24+
run: |
25+
npm install commitlint @commitlint/config-conventional @commitlint/cli
26+
27+
- name: Validate PR commits with commitlint
28+
if: github.event_name == 'pull_request'
29+
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Validate PR title
2+
3+
on:
4+
pull_request_target:
5+
branches: ["main"]
6+
types:
7+
- opened
8+
- edited
9+
- synchronize
10+
11+
jobs:
12+
titlelint:
13+
name: Validate PR title
14+
runs-on: ubuntu-latest
15+
permissions:
16+
pull-requests: read
17+
18+
steps:
19+
- uses: amannn/action-semantic-pull-request@v5
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
with:
23+
# Configure which types are allowed.
24+
# Default: https://github.com/commitizen/conventional-commit-types
25+
types: |
26+
fix
27+
feat
28+
docs
29+
ci
30+
chore
31+
# Configure that a scope must always be provided.
32+
requireScope: false
33+
# Configure additional validation for the subject based on a regex.
34+
# This example ensures the subject starts with an uppercase character.
35+
subjectPattern: ^[A-Z].+$
36+
# When using "Squash and merge" on a PR with only one commit, GitHub
37+
# will suggest using that commit message instead of the PR title for the
38+
# merge commit, and it's easy to commit this by mistake. Enable this option
39+
# to also validate the commit message for one commit PRs.
40+
validateSingleCommit: false
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Pre-commit and Terraform docs
2+
3+
on:
4+
pull_request:
5+
branches: ["main"]
6+
7+
jobs:
8+
pre-commit:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
16+
- uses: terraform-linters/setup-tflint@v4
17+
- uses: pre-commit/[email protected]
18+
19+
generate-docs:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
pull-requests: write
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: ${{ github.event.pull_request.head.ref }}
29+
30+
- uses: terraform-docs/gh-actions@v1
31+
with:
32+
git-push: "true"
33+
git-commit-message: "chore: terraform-docs: automated action"

.gitignore

Lines changed: 137 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# Local .terraform directories
22
**/.terraform/*
33

4+
# Terraform lockfile
5+
.terraform.lock.hcl
6+
47
# .tfstate files
58
*.tfstate
69
*.tfstate.*
710

811
# Crash log files
912
crash.log
10-
crash.*.log
1113

12-
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
13-
# password, private keys, and other secrets. These should not be part of version
14-
# control as they are data points which are potentially sensitive and subject
14+
# Exclude all .tfvars files, which are likely to contain sentitive data, such as
15+
# password, private keys, and other secrets. These should not be part of version
16+
# control as they are data points which are potentially sensitive and subject
1517
# to change depending on the environment.
1618
*.tfvars
17-
*.tfvars.json
1819

1920
# Ignore override files as they are usually used to override resources locally and so
2021
# are not checked in
@@ -23,15 +24,137 @@ override.tf.json
2324
*_override.tf
2425
*_override.tf.json
2526

26-
# Ignore transient lock info files created by terraform apply
27-
.terraform.tfstate.lock.info
28-
29-
# Include override files you do wish to add to version control using negated pattern
30-
# !example_override.tf
31-
32-
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
33-
# example: *tfplan*
34-
3527
# Ignore CLI configuration files
3628
.terraformrc
3729
terraform.rc
30+
31+
# Logs
32+
logs
33+
*.log
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
lerna-debug.log*
38+
.pnpm-debug.log*
39+
40+
# Diagnostic reports (https://nodejs.org/api/report.html)
41+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
42+
43+
# Runtime data
44+
pids
45+
*.pid
46+
*.seed
47+
*.pid.lock
48+
49+
# Directory for instrumented libs generated by jscoverage/JSCover
50+
lib-cov
51+
52+
# Coverage directory used by tools like istanbul
53+
coverage
54+
*.lcov
55+
56+
# nyc test coverage
57+
.nyc_output
58+
59+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
60+
.grunt
61+
62+
# Bower dependency directory (https://bower.io/)
63+
bower_components
64+
65+
# node-waf configuration
66+
.lock-wscript
67+
68+
# Compiled binary addons (https://nodejs.org/api/addons.html)
69+
build/Release
70+
71+
# Dependency directories
72+
node_modules/
73+
jspm_packages/
74+
75+
# Snowpack dependency directory (https://snowpack.dev/)
76+
web_modules/
77+
78+
# TypeScript cache
79+
*.tsbuildinfo
80+
81+
# Optional npm cache directory
82+
.npm
83+
84+
# Optional eslint cache
85+
.eslintcache
86+
87+
# Optional stylelint cache
88+
.stylelintcache
89+
90+
# Microbundle cache
91+
.rpt2_cache/
92+
.rts2_cache_cjs/
93+
.rts2_cache_es/
94+
.rts2_cache_umd/
95+
96+
# Optional REPL history
97+
.node_repl_history
98+
99+
# Output of 'npm pack'
100+
*.tgz
101+
102+
# Yarn Integrity file
103+
.yarn-integrity
104+
105+
# dotenv environment variable files
106+
.env
107+
.env.development.local
108+
.env.test.local
109+
.env.production.local
110+
.env.local
111+
112+
# parcel-bundler cache (https://parceljs.org/)
113+
.cache
114+
.parcel-cache
115+
116+
# Next.js build output
117+
.next
118+
out
119+
120+
# Nuxt.js build / generate output
121+
.nuxt
122+
dist
123+
124+
# Gatsby files
125+
.cache/
126+
# Comment in the public line in if your project uses Gatsby and not Next.js
127+
# https://nextjs.org/blog/next-9-1#public-directory-support
128+
# public
129+
130+
# vuepress build output
131+
.vuepress/dist
132+
133+
# vuepress v2.x temp and cache directory
134+
.temp
135+
.cache
136+
137+
# Docusaurus cache and generated files
138+
.docusaurus
139+
140+
# Serverless directories
141+
.serverless/
142+
143+
# FuseBox cache
144+
.fusebox/
145+
146+
# DynamoDB Local files
147+
.dynamodb/
148+
149+
# TernJS port file
150+
.tern-port
151+
152+
# Stores VSCode versions used for testing VSCode extensions
153+
.vscode-test
154+
155+
# yarn v2
156+
.yarn/cache
157+
.yarn/unplugged
158+
.yarn/build-state.yml
159+
.yarn/install-state.gz
160+
.pnp.*

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
default_install_hook_types:
2+
- pre-commit
3+
4+
repos:
5+
- repo: https://github.com/antonbabenko/pre-commit-terraform
6+
rev: v1.86.0
7+
hooks:
8+
- id: terraform_fmt
9+
- id: terraform_validate
10+
- id: terraform_tflint
11+
12+
- repo: https://github.com/pre-commit/pre-commit-hooks
13+
rev: v4.5.0
14+
hooks:
15+
- id: end-of-file-fixer

.releaserc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
[
7+
"@semantic-release/git",
8+
{
9+
"message": "chore(release): ${nextRelease.version} :tada: :rocket:\n\n${nextRelease.notes}"
10+
}
11+
],
12+
"@semantic-release/github"
13+
]
14+
}

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional']
3+
}

0 commit comments

Comments
 (0)