Skip to content

Commit

Permalink
fix: Updates workflows and remove deprecation (#9)
Browse files Browse the repository at this point in the history
* fix: Updates workflows and remove deprecation

* fix: Update tfcheck workflow directory
  • Loading branch information
13archit authored Jan 9, 2025
1 parent 7054276 commit 4a4101b
Show file tree
Hide file tree
Showing 23 changed files with 105 additions and 204 deletions.
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@master
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
assignees: 'clouddrove-ci'
11 changes: 11 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Auto merge
on:
pull_request:
jobs:
auto-merge:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_merge.yml@master
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
tfcheck: 'example-action_group / Check code format'
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "*"
workflow_dispatch:
jobs:
call-workflow-changelog:
changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
secrets: inherit
with:
Expand Down
59 changes: 10 additions & 49 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,15 @@
name: 'Create README.md file'
name: Readme Workflow
on:
push:
branches:
- master

paths-ignore:
- 'README.md'
- 'docs/**'
workflow_dispatch:
jobs:
readme-create:
name: 'readme-create'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master

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

- name: 'create readme'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: 'pre-commit check errors'
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'pre-commit fix erros'
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/[email protected]'
continue-on-error: true
with:
actions_subcommand: 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()
README:
uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@master
secrets:
TOKEN : ${{ secrets.GITHUB }}
SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }}
30 changes: 0 additions & 30 deletions .github/workflows/semantic-releaser.yml

This file was deleted.

74 changes: 0 additions & 74 deletions .github/workflows/static-checks.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/tf-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
example-action_group:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './examples/AzMonitor-ActionGroups'
example-activity_log_alert:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './examples/AzMonitor-ActivityLogAlerts'
example-metric_alerts:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
with:
working_directory: './examples/AzMonitor-MetricAlerts'
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 }}
23 changes: 14 additions & 9 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
# Run `make readme` to rebuild the `README.md`
#


# Name of this project
name : Terraform AZURE MONITOR ALERTS
name: Terraform AZURE MONITOR ALERTS

# License of this project
license: "APACHE"
Expand All @@ -15,21 +16,25 @@ github_repo: clouddrove/terraform-azure-monitor-alerts

# Badges to display
badges:
- name: "Terraform"
image: "https://img.shields.io/badge/Terraform-v1.1.7-green"
url: "https://www.terraform.io"
- name: "Latest Release"
image: "https://img.shields.io/github/release/clouddrove/terraform-azure-monitor-alerts.svg"
url: "https://github.com/clouddrove/terraform-azure-monitor-alerts/releases/latest"
- name: "tfsec"
image: "https://github.com/clouddrove/terraform-azure-monitor-alerts/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/clouddrove/terraform-azure-monitor-alerts/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"

# description of this project
description: |-
Terraform module to create monitor alerts resource on AZURE.
Terraform module to create subnet resource on AZURE.
# extra content
include:
- "terraform.md"

# How to use this project
# yamllint disable rule:line-length
usage: |-
Here are some examples of how you can use this module in your inventory structure:
### action group
Expand All @@ -50,12 +55,12 @@ usage: |-
actionGroupEmailReceiver = [
{
name = "example"
email_address = "example@gmail.com"
email_address = "myemail@example.com"
use_common_alert_schema = "true"
},
{
name = "test"
email_address = "test@gmail.com"
email_address = "myemail@example.com"
use_common_alert_schema = "true"
}
]
Expand All @@ -81,7 +86,7 @@ usage: |-
actionGroupEmailReceiver = [
{
name = "test"
email_address = "mahesh.yadav@clouddrove.com"
email_address = "myemail@example.com"
use_common_alert_schema = "true"
},
{
Expand Down Expand Up @@ -119,4 +124,4 @@ usage: |-
}
```
```
1 change: 0 additions & 1 deletion _examples/AzMonitor-ActionGroups/outputs.tf

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion _examples/AzMonitor-MetricAlerts/outputs.tf

This file was deleted.

Empty file.
33 changes: 0 additions & 33 deletions _test/monitor_test.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
provider "azurerm" {
features {
}
subscription_id = "000000-11111-1223-XXX-XXXXXXXXXXXX"
}

module "resource_group" {
Expand Down
3 changes: 3 additions & 0 deletions examples/AzMonitor-ActionGroups/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "action-group" {
value = module.azmonitor-action-groups.ag
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=2.90.0"
version = ">=4.0.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
provider "azurerm" {
features {}
subscription_id = "000000-11111-1223-XXX-XXXXXXXXXXXX"
}

module "resource_group" {
Expand All @@ -26,7 +27,7 @@ module "azmonitor-action-group" {
actionGroupEmailReceiver = [
{
name = "test"
email_address = "archit.chopra@clouddrove.com"
email_address = "myemail@example.com"
use_common_alert_schema = "false"
}
]
Expand Down
Loading

0 comments on commit 4a4101b

Please sign in to comment.