Skip to content

Commit

Permalink
feat: update github-action version and added automerge file (#32)
Browse files Browse the repository at this point in the history
* feat: update github-action version and added automerge file

* feat: update github-action version and added automerge file

* feat: update github-action version and added automerge file

* feat: update github-action version and added automerge file

* feat: update github-action version and added automerge file

* feat: update github-action version and added automerge file

---------

Co-authored-by: anmolnagpal <anmol@clouddrove.com>
  • Loading branch information
theprashantyadav and anmolnagpal committed Jan 5, 2024
1 parent fbac065 commit 418edeb
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 151 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These owners will be the default owners for everything in the repo.
* @anmolnagpal @clouddrove/approvers @clouddrove-ci
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## what
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
* Use bullet points to be concise and to the point.

## why
* Provide the justifications for the changes (e.g. business case).
* Describe why these changes were made (e.g. why do these commits fix the problem?)
* Use bullet points to be concise and to the point.

## references
* Link to any supporting jira issues or helpful documentation to add some context (e.g. stackoverflow).
* Use `closes #123`, if this PR closes a Jira issue `#123`
14 changes: 14 additions & 0 deletions .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Auto Assign PRs

on:
pull_request:
types: [opened, reopened]

workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@1.0.9
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
assignees: 'clouddrove-ci'
12 changes: 12 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Auto merge
on:
pull_request:
jobs:
auto-merge:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_merge.yml@1.0.9
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
tfcheck: 'alarm / Check code format'
...
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@1.0.9
secrets: inherit
with:
branch: 'master'
branch: 'master'
58 changes: 9 additions & 49 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Create README.md files'
name: 'Create README.md file'
on:
push:
branches:
Expand All @@ -13,34 +13,33 @@ jobs:
uses: actions/checkout@master

- name: 'Set up Python 3.7'
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB}}'
github_token: '${{ secrets.GITHUB }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'pre-commit check errors'
uses: pre-commit/action@v2.0.0
uses: pre-commit/action@v3.0.0
continue-on-error: true

- name: 'pre-commit fix erros'
uses: pre-commit/action@v2.0.0
uses: pre-commit/action@v3.0.0
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
continue-on-error: true
with:
actions_subcommand: 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
Expand All @@ -52,42 +51,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()

# Create README for each Submodules
readme-create-submodule:
name: 'Submodule readme-create'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master
with:
ref: "master"

- name: Generate TF Docs
uses: terraform-docs/gh-actions@v1.0.0
with:
working-dir: modules/alarm,modules/analyzer,modules/cloudtrail,modules/ebs,modules/iam,modules/security_hub,modules/shield,modules/config,modules/guardduty,modules/inspector
git-push: true
git-push-user-name: "clouddrove-ci"
git-push-user-email: 84795582+clouddrove-ci@users.noreply.github.com
git-commit-message: "readme: Update modules readme files"

# Create README for each Examples
readme-create-examlpes:
name: 'Examples readme-create'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master
with:
ref: "master"

- name: Generate TF Docs
uses: terraform-docs/gh-actions@v1.0.0
with:
working-dir: examples/alarm/complete,examples/analyzer/complete,examples/analyzer/organisation_account,examples/cloudtrail/complete,examples/cloudtrail/organisation_account,examples/config/complete,examples/ebs/complete,examples/guardduty/complete,examples/guardduty/organisation_account,examples/iam/complete,examples/inspector/complete,examples/security-hub/complete,examples/security-hub/managed_security_hub,examples/security-hub/organisation_account,examples/shield/complete
indention: 3
git-push: true
git-push-user-name: "clouddrove-ci"
git-push-user-email: 84795582+clouddrove-ci@users.noreply.github.com
git-commit-message: "readme: Update Examples readme files"
99 changes: 0 additions & 99 deletions .github/workflows/terraform.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
alarm:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/alarm/complete/'
analyzer-complete:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/analyzer/complete/'
analyzer-organisation_account:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/analyzer/organisation_account/'
cloudtrail-complete:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/cloudtrail/complete/'
cloudtrail-organisation_account:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/cloudtrail/organisation_account/'
config:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/config/complete/'
ebs:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/ebs/complete/'
guardduty-complete:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/guardduty/complete/'
guardduty-organisation_account:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/guardduty/organisation_account/'
iam:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/iam/complete/'
inspector:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/inspector/complete/'
security-hub-complete:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/security-hub/complete/'
security-hub-managed_security_hub:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/security-hub/managed_security_hub/'
security-hub-organisation_account:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/security-hub/organisation_account/'
shield:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.9
with:
working_directory: './examples/shield/complete/'
11 changes: 11 additions & 0 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tf-lint
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-lint:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@1.0.9
secrets:
GITHUB: ${{ secrets.GITHUB }}
2 changes: 1 addition & 1 deletion .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.0.9
secrets: inherit
with:
working_directory: '.'

0 comments on commit 418edeb

Please sign in to comment.