Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SarhadMeta committed Dec 2, 2024
1 parent f817d69 commit 2817200
Show file tree
Hide file tree
Showing 23 changed files with 890 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

updates:

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

- package-ecosystem: "terraform"
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
26 changes: 26 additions & 0 deletions .github/workflows/checkov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Checkov
on:
pull_request:
push:
branches: [main, master]
jobs:
terraform-validate:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
discussions: write
pull-requests: write
security-events: write
id-token: write
strategy:
matrix:
path:
- /

steps:
- uses: dasmeta/reusable-actions-workflows/[email protected]
with:
fetch-depth: 0
directory: ${{ matrix.path }}
continue-on-error: true
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
23 changes: 23 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pre-Commit
on:
pull_request:
push:
branches: [main, master]
jobs:
terraform-validate:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
discussions: write
pull-requests: write
id-token: write
steps:
- name: Pre-Commit
uses: dasmeta/reusable-actions-workflows/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
path: modules/${{ matrix.path }}
continue-on-error: true
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 }}
27 changes: 27 additions & 0 deletions .github/workflows/terraform-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Terraform Test
on:
pull_request:
push:
branches: [main, master]
jobs:
terraform-validate:
permissions:
actions: write
contents: write
discussions: write
pull-requests: write
id-token: write
runs-on: ubuntu-latest
strategy:
matrix:
path:
- /

steps:
- uses: dasmeta/reusable-actions-workflows/[email protected]
with:
aws-region: ${{ secrets.AWS_REGION}}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
path: ${{ matrix.path }}
continue-on-error: true
30 changes: 30 additions & 0 deletions .github/workflows/tflint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tflint
on:
pull_request:
push:
branches: [main, master]

jobs:
terraform-validate:
permissions:
actions: write
contents: write
discussions: write
pull-requests: write
id-token: write
security-events: write
runs-on: ubuntu-latest
strategy:
matrix:
path:
- /

steps:
- uses: dasmeta/reusable-actions-workflows/[email protected]
with:
aws-region: ${{ secrets.AWS_REGION}}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
path: ${{ matrix.path }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
20 changes: 20 additions & 0 deletions .github/workflows/tfsec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: TFSEC
on:
pull_request:
push:
branches: [main, master]
jobs:
terraform-tfsec:
runs-on: ubuntu-latest
permissions:
actions: write
contents: write
discussions: write
pull-requests: write
id-token: write
security-events: write
steps:
- uses: dasmeta/reusable-actions-workflows/[email protected]
with:
fetch-depth: 0
continue-on-error: true
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: CHANGELOG.md
- id: check-yaml
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
args: [--fix=lf]
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.64.1
hooks:
- id: terraform_fmt
- id: terraform_docs
args:
- --hook-config=--path-to-file=README.md
- --hook-config=--add-to-existing-file=true
- --hook-config=--create-file-if-not-exist=true
Loading

0 comments on commit 2817200

Please sign in to comment.