Skip to content

Commit

Permalink
fix: Update workflows and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
13archit committed Aug 11, 2023
1 parent 51b7e0b commit a7afe40
Show file tree
Hide file tree
Showing 14 changed files with 132 additions and 235 deletions.
30 changes: 29 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 3
assignees:
- "clouddrove-ci"
reviewers:
- "approvers"

- package-ecosystem: "terraform" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
Expand All @@ -14,8 +24,24 @@ updates:
# Add reviewer
reviewers:
- "approvers"
# Allow up to 3 open pull requests for pip dependencies
open-pull-requests-limit: 3

- package-ecosystem: "terraform" # See documentation for possible values
directory: "/_example/privat_ecr" # Location of package manifests
schedule:
interval: "weekly"
# Add assignees
assignees:
- "clouddrove-ci"
# Add reviewer
reviewers:
- "approvers"
# Allow up to 3 open pull requests for pip dependencies
open-pull-requests-limit: 3

- package-ecosystem: "terraform" # See documentation for possible values
directory: "_example/" # Location of package manifests
directory: "/_example/public_ecr" # Location of package manifests
schedule:
interval: "weekly"
# Add assignees
Expand All @@ -24,3 +50,5 @@ updates:
# Add reviewer
reviewers:
- "approvers"
# Allow up to 3 open pull requests for pip dependencies
open-pull-requests-limit: 3
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/auto_assignee.yml@master
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
assignees: 'clouddrove-ci'
19 changes: 9 additions & 10 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,34 @@ on:
push:
branches:
- master

jobs:
readme-create:
readme:
name: 'readme-create'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2.3.4
uses: actions/checkout@master

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

- name: 'create readme'
uses: 'clouddrove/github-actions@v9.0.2'
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 errors'
uses: pre-commit/action@v2.0.0
- name: 'pre-commit fix erros'
uses: pre-commit/action@v3.0.0
continue-on-error: true

- name: 'push readme'
Expand All @@ -40,7 +39,7 @@ jobs:
with:
actions_subcommand: 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
Expand Down
84 changes: 0 additions & 84 deletions .github/workflows/terraform.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/terratest.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/tfchecks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-checks-private-ecr-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_example/private-subnet/'
tf-checks-public_ecr-example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './_example/public_ecr/'

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@master
secrets:
GITHUB: ${{ secrets.GITHUB }}
45 changes: 0 additions & 45 deletions _example/outputs.tf

This file was deleted.

16 changes: 16 additions & 0 deletions _example/private_ecr/example.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
provider "aws" {
region = "us-east-1"
}

module "private_ecr" {
source = "./../../"

enable_private_ecr = true
name = "private-ecr"
environment = "test"
label_order = ["environment", "name"]
scan_on_push = true
max_image_count = 7
image_tag_mutability = "IMMUTABLE"
encryption_type = "KMS"
}
19 changes: 19 additions & 0 deletions _example/private_ecr/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
output "private_ecr_arn" {
value = module.private_ecr.*.arn
description = "Registry name."
}

output "private_ecr_tags" {
value = module.private_ecr.tags
description = "A mapping of tags to assign to the alb."
}

output "private_ecr_registry_id" {
value = module.private_ecr.registry_id
description = "The registry ID where the repository was created."
}

output "private_ecr_registry_url" {
value = module.private_ecr.registry_url
description = "The URL of the repository (in the form."
}
14 changes: 1 addition & 13 deletions _example/example.tf → _example/public_ecr/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,9 @@ provider "aws" {
region = "us-east-1"
}

module "private_ecr" {
source = "./../"

enable_private_ecr = true
name = "private-ecr"
environment = "test"
label_order = ["environment", "name"]
scan_on_push = true
max_image_count = 7
image_tag_mutability = "IMMUTABLE"
encryption_type = "KMS"
}

module "public_ecr" {
source = "./../"
source = "./../../"

enable_public_ecr = true
name = "public-ecr"
Expand Down
19 changes: 19 additions & 0 deletions _example/public_ecr/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
output "public_ecr_arn" {
value = module.public_ecr.*.arn
description = "Registry name."
}

output "public_ecr_tags" {
value = module.public_ecr.tags
description = "A mapping of tags to assign to the alb."
}

output "public_ecr_registry_id" {
value = module.public_ecr.registry_id
description = "The registry ID where the repository was created."
}

output "public_ecr_registry_url" {
value = module.public_ecr.registry_url
description = "The URL of the repository (in the form."
}
Loading

0 comments on commit a7afe40

Please sign in to comment.