Skip to content

Commit a86e62b

Browse files
author
Workflow Sync Bot
committed
[SYNC] mcaf-github-workflows
1 parent 0b17eb5 commit a86e62b

12 files changed

+135
-233
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ assignees: ''
1010
**💡 Problem description**
1111
Enter summary of the problem here.
1212

13-
**✏️ Name and email of requester**
14-
Details of the requester.
15-
1613
**☹️ Current Behavior**
1714
Describe what is happening. More detail is better. When code is pasted, use correct formatting.
1815

@@ -24,3 +21,8 @@ Enter detailed steps to reproduce here. More detail is better.
2421

2522
**🚧 Workaround**
2623
If there is a way to work around the problem, place that information here.
24+
25+
**💻 Environment**
26+
Anything that will help triage the bug will help. For example:
27+
- Terraform version
28+
- Module version

.github/ISSUE_TEMPLATE/general-request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: General Request
33
about: A template for a general request on this repository
44
title: ''
5-
labels: documentation, enhancement, question
5+
labels: documentation, enhancement, chore
66
assignees: ''
77

88
---
@@ -11,7 +11,7 @@ assignees: ''
1111
A clear and concise description of what the request is about. Please add the fitting label to this issue:
1212
- Documentation
1313
- Enhancement
14-
- Question
14+
- Chore (not covered by something else / question)
1515

1616
**:bookmark: Additional context**
1717
Add any other context or screenshots about the feature request here.

.github/labels.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
description: New feature or request
1717
- name: fix
1818
color: "d93f0b"
19-
description: Something isn't working
20-
- name: misc
21-
color: "#6B93D3"
22-
description: Miscellaneous task not covered by something else
19+
description: Fixes a bug
20+
- name: chore
21+
color: "6b93d3"
22+
description: Task not covered by something else (e.g. refactor, CI changes, tests)
2323
- name: no-changelog
2424
color: "cccccc"
2525
description: No entry should be added to the release notes and changelog

.github/pull_request_template.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
**:bulb: Summary of the pull request**
1+
**:hammer_and_wrench: Summary**
2+
<!--- A clear and concise description of what the PR entails. -->
23
<!-- Ex. I have added extra variables to be able to deploy [...] -->
34

4-
**:hammer_and_wrench: Implementation Details**
5-
<!-- A clear and concise description of what the PR entails. We cannot guess what you mean by a code change. -->
5+
**:rocket: Motivation**
6+
<!-- Why is this change required? What problem does it solve? -->
67

78
**:pencil: Additional Information**
8-
<!-- If the proposed changes entail any design decisions, please enter any background or references such as Confluence, Microsoft Docs, etc. that may help with reviewing the PR. -->
9+
<!-- If the proposed changes entail any design decisions, please provide any relevant background or references such as links to Confluence, Microsoft Docs, or images that may help with reviewing the PR. -->

.github/release-drafter-config.yaml

Lines changed: 48 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,89 @@
1-
name-template: 'v$RESOLVED_VERSION'
2-
tag-template: 'v$RESOLVED_VERSION'
3-
version-template: '$MAJOR.$MINOR.$PATCH'
1+
name-template: "v$RESOLVED_VERSION"
2+
tag-template: "v$RESOLVED_VERSION"
3+
version-template: "$MAJOR.$MINOR.$PATCH"
44
change-title-escapes: '\<*_&'
55

66
categories:
7-
- title: '🚀 Features'
7+
- title: "🚀 Features"
88
labels:
9-
- 'breaking'
10-
- 'enhancement'
11-
- 'feature'
12-
- title: '🐛 Bug Fixes'
9+
- "breaking"
10+
- "enhancement"
11+
- "feature"
12+
- title: "🐛 Bug Fixes"
1313
labels:
14-
- 'bug'
15-
- 'fix'
16-
- 'security'
17-
- title: '📖 Documentation'
14+
- "bug"
15+
- "fix"
16+
- "security"
17+
- title: "📖 Documentation"
1818
labels:
19-
- 'documentation'
20-
- title: '🧺 Miscellaneous'
19+
- "documentation"
20+
- title: "🧺 Miscellaneous"
2121
labels:
22-
- 'misc'
22+
- "chore"
2323

2424
version-resolver:
2525
major:
2626
labels:
27-
- 'breaking'
27+
- "breaking"
2828
minor:
2929
labels:
30-
- 'enhancement'
31-
- 'feature'
30+
- "enhancement"
31+
- "feature"
3232
patch:
3333
labels:
34-
- 'bug'
35-
- 'documentation'
36-
- 'fix'
37-
- 'security'
38-
default: 'minor'
34+
- "bug"
35+
- "chore"
36+
- "documentation"
37+
- "fix"
38+
- "security"
39+
default: "minor"
3940

4041
autolabeler:
41-
- label: 'documentation'
42+
- label: "documentation"
4243
body:
43-
- '/documentation/'
44+
- "/documentation/"
4445
branch:
4546
- '/docs\/.+/'
4647
title:
47-
- '/documentation/i'
48-
- '/docs/i'
49-
- label: 'bug'
48+
- "/documentation/i"
49+
- "/docs/i"
50+
- label: "bug"
5051
body:
51-
- '/bug/'
52+
- "/bug/"
5253
branch:
5354
- '/bug\/.+/'
5455
- '/fix\/.+/'
5556
title:
56-
- '/bug/i'
57-
- '/fix/i'
58-
- label: 'feature'
57+
- "/bug/i"
58+
- "/fix/i"
59+
- label: "feature"
5960
branch:
6061
- '/feature\/.+/'
6162
- '/enhancement\/.+/'
6263
title:
63-
- '/feature/i'
64-
- '/feat/i'
65-
- '/enhancement/i'
66-
- label: 'breaking'
64+
- "/feature/i"
65+
- "/feat/i"
66+
- "/enhancement/i"
67+
- label: "breaking"
6768
body:
68-
- '/breaking/'
69+
- "/breaking change/i"
6970
branch:
7071
- '/breaking\/.+/'
7172
title:
72-
- '/breaking/i'
73-
- '/major/i'
73+
- "/!:/"
74+
- "/breaking/i"
75+
- "/major/i"
76+
- label: "chore"
77+
branch:
78+
- '/chore\/.+/'
79+
title:
80+
- "/chore/i"
7481

7582
exclude-contributors:
76-
- 'github-actions[bot]'
83+
- "github-actions[bot]"
7784

7885
exclude-labels:
79-
- 'no-changelog'
86+
- "no-changelog"
8087

8188
template: |
8289
# What's Changed

.github/workflows/label-synchronization.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: label-synchronization
25
on:
36
workflow_dispatch:

.github/workflows/pr-validation.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: "pr-validation"
25

36
on:
@@ -31,13 +34,13 @@ jobs:
3134
types: |
3235
breaking
3336
bug
37+
chore
3438
docs
3539
documentation
3640
enhancement
3741
feat
3842
feature
3943
fix
40-
misc
4144
security
4245
requireScope: false
4346
ignoreLabels: |
@@ -82,7 +85,7 @@ jobs:
8285
- uses: danielchabr/pr-labels-checker@v3.3
8386
id: lint_pr_labels
8487
with:
85-
hasSome: breaking,bug,documentation,enhancement,feature,fix,misc,security
88+
hasSome: breaking,bug,chore,documentation,enhancement,feature,fix,security
8689
githubToken: ${{ secrets.GITHUB_TOKEN }}
8790

8891
- uses: marocchino/sticky-pull-request-comment@v2
@@ -94,7 +97,16 @@ jobs:
9497
message: |
9598
Hey there and thank you for opening this pull request! 👋🏼
9699
97-
The PR needs to have at least one of the following labels: breaking, bug, documentation, enhancement, feature, fix, misc, security.
100+
The PR needs to have at least one of the following labels:
101+
102+
- breaking
103+
- bug
104+
- chore
105+
- documentation
106+
- enhancement
107+
- feature
108+
- fix
109+
- security
98110
99111
# Delete a previous comment when the issue has been resolved
100112
- if: ${{ steps.lint_pr_labels.outputs.passed != false }}

.github/workflows/release-drafter.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: "release-drafter"
25

36
on:

.github/workflows/terraform-validation.yaml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: "terraform"
25

36
on:
@@ -19,7 +22,7 @@ jobs:
1922
uses: actions/checkout@v4
2023

2124
- name: Setup Terraform
22-
uses: hashicorp/setup-terraform@v2
25+
uses: hashicorp/setup-terraform@v3
2326

2427
- name: Setup Terraform Linters
2528
uses: terraform-linters/setup-tflint@v4
@@ -60,7 +63,7 @@ jobs:
6063
terraform init
6164
terraform test
6265
63-
- uses: actions/github-script@v6
66+
- uses: actions/github-script@v7
6467
if: github.event_name == 'pull_request' || always()
6568
with:
6669
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -114,7 +117,7 @@ jobs:
114117
ref: ${{ github.event.pull_request.head.ref }}
115118

116119
- name: Render terraform docs inside the README.md and push changes back to PR branch
117-
uses: terraform-docs/gh-actions@v1.1.0
120+
uses: terraform-docs/gh-actions@v1.3.0
118121
with:
119122
args: --sort-by required
120123
git-commit-message: "docs(readme): update module usage"
@@ -124,24 +127,28 @@ jobs:
124127
working-dir: .
125128
continue-on-error: true # added this to prevent a PR from a remote fork failing the workflow
126129

127-
tfsec:
130+
# If the recursive flag is set to true, the action will not update the main README.md file.
131+
# Therefore we need to run the action twice, once for the root module and once for the modules directory
132+
docs-modules:
128133
runs-on: ubuntu-latest
129134
steps:
130135
- name: Checkout code
131136
uses: actions/checkout@v4
132-
133-
- name: Terraform security scan
134-
uses: aquasecurity/tfsec-action@v1.0.3
135137
with:
136-
github_token: ${{ github.token }}
137-
soft_fail: false
138-
tfsec_args: --concise-output --force-all-dirs
138+
ref: ${{ github.event.pull_request.head.ref }}
139139

140-
- name: Terraform pr commenter
141-
uses: aquasecurity/tfsec-pr-commenter-action@v1.3.1
140+
- name: Render terraform docs inside the README.md and push changes back to PR branch
141+
uses: terraform-docs/gh-actions@v1.3.0
142142
with:
143-
github_token: ${{ github.token }}
144-
tfsec_args: --concise-output --force-all-dirs
143+
args: --sort-by required
144+
git-commit-message: "docs(readme): update module usage"
145+
git-push: true
146+
output-file: README.md
147+
output-method: inject
148+
recursive-path: modules
149+
recursive: true
150+
working-dir: .
151+
continue-on-error: true # added this to prevent a PR from a remote fork failing the workflow
145152

146153
checkov:
147154
runs-on: ubuntu-latest

.github/workflows/update-changelog.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# DO NOT CHANGE THIS FILE DIRECTLY
2+
# Source: https://github.com/schubergphilis/mcaf-github-workflows
3+
14
name: "update-changelog"
25

36
on:

0 commit comments

Comments
 (0)