Skip to content

Commit

Permalink
Merge pull request #15 from dasmeta/DMVP-tf-init
Browse files Browse the repository at this point in the history
DMVP-0000: Initial PR
  • Loading branch information
aghamyan44 committed Sep 5, 2024
2 parents ed2fc32 + 34d3930 commit 32417f7
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 51 deletions.
13 changes: 11 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
version: 2

updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: feat

- package-ecosystem: "terraform"
directory:
- "/"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: feat
14 changes: 14 additions & 0 deletions .github/workflows/branch-name-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Branch Naming Check'
on: pull_request

jobs:
branch-naming-rules:
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/action-branch-name@master
with:
regex: 'DMVP-[0-9]*' # Regex the branch should match. This example enforces grouping
allowed_prefixes: 'DMVP-' # All branches should start with the given prefix
ignore: master,develop # Ignore exactly matching branch names from convention
min_length: 5 # Min length of the branch name
max_length: 30 # Max length of the branch name
4 changes: 2 additions & 2 deletions .github/workflows/checkov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
matrix:
path:
- /

steps:
- uses: dasmeta/reusable-actions-workflows/checkov@main
- uses: dasmeta/reusable-actions-workflows/checkov@4.2.0
with:
fetch-depth: 0
directory: ${{ matrix.path }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pr-title-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'PR Title Checker'
on:
pull_request:
types: [edited, opened, synchronize, reopened]

jobs:
title-check:
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/[email protected]
with:
regex: 'DMVP-[0-9]*:' # Regex the title should match.
allowed_prefixes: 'DMVP-' # title should start with the given prefix
prefix_case_sensitive: false # title prefix are case insensitive
min_length: 5 # Min length of the title
max_length: -1 # Max length of the title
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
id-token: write
steps:
- name: Pre-Commit
uses: dasmeta/reusable-actions-workflows/pre-commit@main
uses: dasmeta/reusable-actions-workflows/pre-commit@4.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Semantic-Release
on: [pull_request, push]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
discussions: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/terraform-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
matrix:
path:
- /

steps:
- uses: dasmeta/reusable-actions-workflows/terraform-test@main
- uses: dasmeta/reusable-actions-workflows/terraform-test@4.2.0
with:
aws-region: ${{ secrets.AWS_REGION}}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tflint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
matrix:
path:
- /

steps:
- uses: dasmeta/reusable-actions-workflows/tflint@main
- uses: dasmeta/reusable-actions-workflows/tflint@4.2.0
with:
aws-region: ${{ secrets.AWS_REGION}}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tfsec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
id-token: write
security-events: write
steps:
- uses: dasmeta/reusable-actions-workflows/tfsec@main
- uses: dasmeta/reusable-actions-workflows/tfsec@4.2.0
with:
fetch-depth: 0
continue-on-error: true
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ repos:
- --hook-config=--path-to-file=README.md
- --hook-config=--add-to-existing-file=true
- --hook-config=--create-file-if-not-exist=true
- repo: https://github.com/qoomon/git-conventional-commits
rev: v2.4.0
hooks:
- id: conventional-commits
- repo: https://github.com/zricethezav/gitleaks
rev: v8.12.0
hooks:
- id: gitleaks
61 changes: 20 additions & 41 deletions githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -1,41 +1,20 @@
{
"convention" : {
"commitTypes": [
"feat",
"fix",
"perf",
"refactor",
"style",
"test",
"build",
"ops",
"docs",
"merge",
"chore"
],
"commitScopes": [],
"releaseTagGlobPattern": "v[0-9]*.[0-9]*.[0-9]*",
"issueRegexPattern": "(^|\\s)#\\d+(\\s|$)"
},
"changelog" : {
"commitTypes": [
"feat",
"fix",
"perf",
"merge"
],
"includeInvalidCommits": true,
"commitScopes": [],
"commitIgnoreRegexPattern": "^WIP ",
"headlines": {
"feat": "Features",
"fix": "Bug Fixes",
"perf": "Performance Improvements",
"merge": "Merged Branches",
"breakingChange": "BREAKING CHANGES"
},
"commitUrl": "https://github.com/ACCOUNT/REPOSITORY/commit/%commit%",
"commitRangeUrl": "https://github.com/ACCOUNT/REPOSITORY/compare/%from%...%to%?diff=split",
"issueUrl": "https://github.com/ACCOUNT/REPOSITORY/issues/%issue%"
}
}
#!/usr/bin/env bash
# File generated by pre-commit: https://pre-commit.com
# ID: 138fd403232d2ddd5efb44317e38bf03

# start templated
INSTALL_PYTHON=/usr/bin/python3
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=commit-msg)
# end templated

HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")

if command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}"
elif [ -x "$INSTALL_PYTHON" ]; then
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
else
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2
exit 1
fi

0 comments on commit 32417f7

Please sign in to comment.