File tree Expand file tree Collapse file tree 8 files changed +143
-0
lines changed
Expand file tree Collapse file tree 8 files changed +143
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Semantic Release
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - dev/*
8+ - feature/*
9+ - hotfix/*
10+
11+ jobs :
12+ semantic-release :
13+ if : " !contains(github.event.head_commit.message, '[skip ci]')"
14+
15+ name : Semantic Release
16+ runs-on : ubuntu-latest
17+ permissions :
18+ contents : write
19+
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+ persist-credentials : false
26+
27+ - uses : actions/setup-node@v3
28+ with :
29+ node-version : " lts/*"
30+
31+ - name : Prepare prerelease semantic
32+ if : github.ref != 'refs/heads/main'
33+ run : mv .releaserc.prerelease.yaml .releaserc.yaml
34+
35+ - name : Semantic Release
36+ uses : cycjimmy/semantic-release-action@v2
37+ id : semantic # Need an `id` for output variables
38+ with :
39+ semantic_version : 17
40+ extra_plugins : |
41+ @semantic-release/changelog@5
42+ @semantic-release/exec@5
43+ @semantic-release/git@9
44+ env :
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+
47+ - name : Do something when a new release published
48+ if : steps.semantic.outputs.new_release_published == 'true'
49+ run : |
50+ echo ${{ steps.semantic.outputs.new_release_version }}
51+ echo ${{ steps.semantic.outputs.new_release_major_version }}
52+ echo ${{ steps.semantic.outputs.new_release_minor_version }}
53+ echo ${{ steps.semantic.outputs.new_release_patch_version }}
Original file line number Diff line number Diff line change 1+ repos :
2+ - repo : https://github.com/pre-commit/pre-commit-hooks
3+ rev : v4.6.0
4+ hooks :
5+ - id : trailing-whitespace
6+ - id : end-of-file-fixer
7+ - id : check-merge-conflict
8+ - repo : https://github.com/antonbabenko/pre-commit-terraform
9+ rev : v1.92.1
10+ hooks :
11+ - id : terraform_fmt
12+ - id : terraform_tflint
13+ args :
14+ - ' --args=--only=terraform_deprecated_interpolation'
15+ - ' --args=--only=terraform_deprecated_index'
16+ - ' --args=--only=terraform_unused_declarations'
17+ - ' --args=--only=terraform_comment_syntax'
18+ - ' --args=--only=terraform_documented_outputs'
19+ - ' --args=--only=terraform_documented_variables'
20+ - ' --args=--only=terraform_typed_variables'
21+ - ' --args=--only=terraform_module_pinned_source'
22+ - ' --args=--only=terraform_naming_convention'
23+ - ' --args=--only=terraform_required_version'
24+ - ' --args=--only=terraform_required_providers'
25+ - ' --args=--only=terraform_standard_module_structure'
26+ - ' --args=--only=terraform_workspace_remote'
27+ - ' --args=--only=terraform_unused_required_providers'
28+ - id : terraform_validate
Original file line number Diff line number Diff line change 1+ plugins :
2+ - " @semantic-release/commit-analyzer"
3+ - " @semantic-release/release-notes-generator"
4+ - " @semantic-release/changelog"
5+ - " @semantic-release/github"
6+
7+ branches :
8+ - " +([0-9])?(.{+([0-9]),x}).x"
9+ - main
10+ - name : dev/*
11+ prerelease : ' ${name.replace(/^dev\//g, "dev-")}'
12+ - name : feature/*
13+ prerelease : ' ${name.replace(/^feature\//g, "feature-")}'
14+ - name : hotfix/*
15+ prerelease : ' ${name.replace(/^hotfix\//g, "hotfix-")}'
Original file line number Diff line number Diff line change 1+ plugins :
2+ - " @semantic-release/commit-analyzer"
3+ - " @semantic-release/release-notes-generator"
4+ - " @semantic-release/changelog"
5+ - " @semantic-release/git"
6+ - " @semantic-release/github"
7+
8+ branches :
9+ - " +([0-9])?(.{+([0-9]),x}).x"
10+ - main
Original file line number Diff line number Diff line change 1+ tf_variables = {
2+ ssh_pub_key_1 = {
3+ name = "<VAR_NAME>"
4+ type = "<VAR_TYPE>"
5+ value = "<VAR_VALUE>"
6+ description = "<VAR_DESCRIPTION>"
7+ }
8+ ssh_pub_key_2 = {
9+ name = "<VAR_NAME>"
10+ type = "<VAR_TYPE>"
11+ value = "<VAR_VALUE>"
12+ description = "<VAR_DESCRIPTION>"
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ resource "aws_ssm_parameter" "this" {
2+ for_each = var. tf_variables
3+ name = each. value [" name" ]
4+ type = each. value [" type" ]
5+ value = each. value [" value" ]
6+ }
Original file line number Diff line number Diff line change 1+ variable "tf_variables" {
2+ type = map (object ({
3+ name = string
4+ type = string
5+ value = string
6+ description = string
7+ }))
8+ description = " Public key used to be placed on the bastion host"
9+ }
Original file line number Diff line number Diff line change 1+ terraform {
2+ required_providers {
3+ aws = {
4+ source = " hashicorp/aws"
5+ version = " ~> 5.65.0"
6+ }
7+ }
8+ }
You can’t perform that action at this time.
0 commit comments