Skip to content

Commit 7fc9f88

Browse files
authored
Merge pull request #1 from PerfectThymeTech/marvinbuss/add_baseline
Add Baseline for Repository
2 parents c7597ba + 36a7e8e commit 7fc9f88

31 files changed

+1412
-2
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* PerfectThymeTech/csa-admins

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Bug report 🐛"
2+
description: Report errors or unexpected behavior
3+
title: "Bug: "
4+
labels:
5+
- bug
6+
- backlog
7+
assignees: "marvinbuss"
8+
9+
body:
10+
- type: markdown
11+
attributes:
12+
value: |
13+
Thanks for taking the time to fill out this report!
14+
15+
- type: textarea
16+
id: reproduce
17+
attributes:
18+
label: Steps to reproduce
19+
placeholder: Please share with us the step(s) required to reproduce the bug.
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: error
25+
attributes:
26+
label: Error Message
27+
description: If possible, please share the error message that you received.
28+
placeholder: Error Messages
29+
render: json
30+
validations:
31+
required: false
32+
33+
- type: textarea
34+
id: screenshots
35+
attributes:
36+
label: Screenshots
37+
description: If possible, please include screenshots and paste them into the markdown editor below.
38+
placeholder: Screenshots
39+
validations:
40+
required: false
41+
42+
- type: markdown
43+
attributes:
44+
value: "Thanks for completing this form!"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Documentation Issue 📚"
2+
description: Report issues in our documentation
3+
title: "Documentation: "
4+
labels:
5+
- documentation
6+
- backlog
7+
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to fill out this report!
13+
14+
- type: textarea
15+
id: description
16+
attributes:
17+
label: Documentation Issue
18+
placeholder: Please share the name of the document along with supporting points on why it requires an amendment.
19+
validations:
20+
required: true
21+
22+
- type: markdown
23+
attributes:
24+
value: "Thanks for completing this form!"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Feature Request & Ideas 🚀"
2+
description: Suggest a new feature or improvement (this does not mean you have to implement it)
3+
title: "Feature: "
4+
labels:
5+
- feature
6+
- backlog
7+
assignees: "marvinbuss"
8+
9+
body:
10+
- type: markdown
11+
attributes:
12+
value: |
13+
Thanks for taking the time to fill out this report!
14+
15+
- type: textarea
16+
id: feature_description
17+
attributes:
18+
label: Feature or Idea - What?
19+
placeholder: Briefly describe what the new feature, idea or enhancement entails.
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: feature_reason
25+
attributes:
26+
label: Feature or Idea - Why?
27+
placeholder: Briefly describe why the new feature, idea or enhancement is required and what outcome you are trying to achieve.
28+
validations:
29+
required: true
30+
31+
- type: markdown
32+
attributes:
33+
value: "Thanks for completing this form!"

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**Proposed changes**:
2+
- ...

.github/dependabot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 2
2+
# enable-beta-ecosystems: true
3+
updates:
4+
5+
# Maintain dependencies for GitHub Actions
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
day: "sunday"
11+
time: "10:00"
12+
labels:
13+
- "github-actions"
14+
- "dependencies"
15+
16+
# Maintain dependencies for pip
17+
- package-ecosystem: "pip"
18+
directory: "code/function/"
19+
schedule:
20+
interval: "weekly"
21+
day: "sunday"
22+
time: "10:00"
23+
labels:
24+
- "pip"
25+
- "dependencies"
26+
27+
# Maintain dependencies for Terraform
28+
- package-ecosystem: "terraform"
29+
directory: "/code/infra"
30+
schedule:
31+
interval: "weekly"
32+
day: "sunday"
33+
time: "10:00"
34+
labels:
35+
- "terraform"
36+
- "dependencies"
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Terraform Apply Template
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
environment:
7+
required: true
8+
type: string
9+
default: "dev"
10+
description: "Specifies the environment of the deployment."
11+
terraform_version:
12+
required: true
13+
type: string
14+
description: "Specifies the terraform version."
15+
working_directory:
16+
required: true
17+
type: string
18+
description: "Specifies the working directory."
19+
secrets:
20+
TENANT_ID:
21+
required: true
22+
description: "Specifies the tenant id of the deployment."
23+
CLIENT_ID:
24+
required: true
25+
description: "Specifies the client id."
26+
CLIENT_SECRET:
27+
required: true
28+
description: "Specifies the client secret."
29+
SUBSCRIPTION_ID:
30+
required: true
31+
description: "Specifies the client id."
32+
33+
permissions:
34+
id-token: write
35+
contents: read
36+
37+
jobs:
38+
deployment:
39+
name: Terraform Apply
40+
runs-on: self-hosted
41+
continue-on-error: false
42+
environment: ${{ inputs.environment }}
43+
44+
env:
45+
ARM_TENANT_ID: ${{ secrets.TENANT_ID }}
46+
ARM_SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }}
47+
ARM_CLIENT_ID: ${{ secrets.CLIENT_ID }}
48+
ARM_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
49+
ARM_USE_OIDC: false
50+
51+
steps:
52+
# Setup Node
53+
- name: Setup Node
54+
id: node_setup
55+
uses: actions/setup-node@v3
56+
with:
57+
node-version: 16
58+
59+
# Setup Terraform
60+
- name: Setup Terraform
61+
id: terraform_setup
62+
uses: hashicorp/setup-terraform@v2
63+
with:
64+
terraform_version: ${{ inputs.terraform_version }}
65+
terraform_wrapper: true
66+
67+
# Check Out Repository
68+
- name: Check Out Repository
69+
id: checkout_repository
70+
uses: actions/checkout@v3
71+
72+
# Terraform Init
73+
- name: Terraform Init
74+
working-directory: ${{ inputs.working_directory }}
75+
run: |
76+
terraform init
77+
78+
# Terraform Apply
79+
- name: Terraform Apply
80+
working-directory: ${{ inputs.working_directory }}
81+
run: |
82+
terraform apply -var-file vars.${{ inputs.environment }}.tfvars -auto-approve -input=false
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Terraform Lint Template
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
terraform_version:
7+
required: true
8+
type: string
9+
description: "Specifies the terraform version."
10+
working_directory:
11+
required: true
12+
type: string
13+
description: "Specifies the working directory."
14+
15+
permissions:
16+
pull-requests: write
17+
18+
jobs:
19+
deployment:
20+
name: Terraform Lint
21+
runs-on: ubuntu-latest
22+
continue-on-error: false
23+
24+
steps:
25+
# Setup Terraform
26+
- name: Setup Terraform
27+
id: terraform_setup
28+
uses: hashicorp/setup-terraform@v2
29+
with:
30+
terraform_version: ${{ inputs.terraform_version }}
31+
terraform_wrapper: true
32+
33+
# Check Out Repository
34+
- name: Check Out Repository
35+
id: checkout_repository
36+
uses: actions/checkout@v3
37+
38+
# Terraform Format
39+
- name: Terraform Format
40+
id: terraform_format
41+
working-directory: ${{ inputs.working_directory }}
42+
run: |
43+
terraform fmt -check -recursive
44+
45+
# Add Pull Request Comment
46+
- name: Add Pull Request Comment
47+
uses: actions/github-script@v6
48+
id: pr_comment
49+
if: github.event_name == 'pull_request'
50+
with:
51+
github-token: ${{ secrets.GITHUB_TOKEN }}
52+
script: |
53+
const output = `#### Terraform Lint Results
54+
* Terraform Version 📎\`${{ inputs.terraform_version }}\`
55+
* Working Directory 📂\`${{ inputs.working_directory }}\`
56+
* Terraform Format and Style 🖌\`${{ steps.terraform_format.outcome }}\``;
57+
58+
github.rest.issues.createComment({
59+
issue_number: context.issue.number,
60+
owner: context.repo.owner,
61+
repo: context.repo.repo,
62+
body: output
63+
})

0 commit comments

Comments
 (0)