Skip to content

Commit

Permalink
Feat: Add automerge github shared workflow (#22)
Browse files Browse the repository at this point in the history
* Feat: Add automerge github shared workflow

* feat: added version.tf in example and fix tflint issue

---------

Co-authored-by: Anmol Nagpal <[email protected]>
  • Loading branch information
vaibhav7797 and anmolnagpal authored Jan 3, 2024
1 parent 85bae1b commit f23c947
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 9 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Auto Assign PRs
on:
pull_request:
types: [opened, reopened]
workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
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/[email protected]
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
tfcheck: 'tf-checks-example / Evaluate Terraform versions (1.6.5, ./_example/)'
...
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'
11 changes: 11 additions & 0 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-checks-example:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
with:
working_directory: './_example/'
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/[email protected]
secrets:
GITHUB: ${{ secrets.GITHUB }}
4 changes: 2 additions & 2 deletions .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: '.'
working_directory: '.'
6 changes: 3 additions & 3 deletions _example/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
output "id" {
value = module.labels.*.id
value = module.labels[*].id
description = "Disambiguated ID."
}

output "tags" {
value = module.labels.*.tags
value = module.labels[*].tags
description = "Normalized Tag map."
}

output "name" {
value = module.labels.*.name
value = module.labels[*].name
description = "Normalized Tag map."
}
11 changes: 9 additions & 2 deletions _example/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.5.7"
}
required_version = ">= 1.6.6"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.31.0"
}
}
}
11 changes: 11 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.6.6"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.31.0"
}
}
}

0 comments on commit f23c947

Please sign in to comment.