Skip to content

Commit bed4e55

Browse files
authored
feat: Changing to AutoTag for version bumps (#9)
1 parent e04510f commit bed4e55

File tree

7 files changed

+28
-69
lines changed

7 files changed

+28
-69
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/main-release.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21-
- name: Setup Node.js
22-
uses: actions/setup-node@v4
23-
with:
24-
node-version: "lts/*"
25-
- name: Install dependencies
26-
run: npm install
27-
- name: Release
21+
22+
- name: fetch tags
23+
run: git fetch --force --tags
24+
25+
- name: install autotag binary
26+
run: |
27+
curl -sL https://git.io/autotag-install | sudo sh -s -- -b /usr/local/bin
28+
29+
- name: increment tag and create release
30+
run: |
31+
set -eou pipefail
32+
33+
new_version=$(autotag -vn)
34+
gh release create v"${new_version}" --target main --title "v${new_version}" --generate-notes
2835
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
run: npx semantic-release
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.pre-commit-config.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ repos:
99
pass_filenames: false
1010
stages: ["commit", "push"]
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v4.4.0
12+
rev: v4.5.0
1313
hooks:
1414
- id: check-merge-conflict
1515
- id: end-of-file-fixer
1616
- repo: https://github.com/antonbabenko/pre-commit-terraform
17-
rev: v1.77.1
17+
rev: v1.83.5
1818
hooks:
1919
- id: terraform_fmt
2020
- id: terraform_validate
@@ -27,10 +27,6 @@ repos:
2727
args:
2828
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
2929
- id: terraform_checkov
30-
- id: terraform_tfsec
31-
args:
32-
- --args=--config-file=__GIT_WORKING_DIR__/.tfsec.json
33-
- --args=--tfvars-file="terraform.tfvars"
3430
- id: infracost_breakdown
3531
args:
3632
- --args=--path=.

.tfsec.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ I use a wide array of tools to make things easier for me.
2828
- [trufflehog](https://github.com/trufflesecurity/trufflehog): Scans your git
2929
repo for committed secrets 😱.
3030
- `brew install trufflesecurity/trufflehog/trufflehog`
31+
- [autotag](https://github.com/pantheon-systems/autotag): Automatically creates
32+
git tags based on the commit message. Used to create semantic version tags in
33+
GitHub Actions pipeline. (Not installed locally, but you could)
34+
- `brew install pantheon-systems/autotag/autotag`
3135

3236
### Tools needed for the Pre-commit hooks that I use
3337

@@ -99,8 +103,6 @@ options.
99103

100104
`TFLint`: Review `.tflint.hcl`
101105

102-
`TFSec`: Review `.tfsec.yml`
103-
104106
`Task`: Review `Taskfile.yaml` and or remove tasks.
105107

106108
`Terraform`: Rename `terraform.tfvars.example` to `terraform.tfvars` and update.
@@ -114,13 +116,14 @@ The following two lines specify where the `terraform-docs` dynamic content will
114116
be placed.
115117

116118
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
119+
117120
## Requirements
118121

119-
| Name | Version |
120-
|------|---------|
121-
| terraform | ~> 1.0 |
122-
| google | ~>4.55 |
123-
| hcp | ~>0.54 |
122+
| Name | Version |
123+
| --------- | ------- |
124+
| terraform | ~> 1.0 |
125+
| google | ~>4.55 |
126+
| hcp | ~>0.54 |
124127

125128
## Providers
126129

@@ -141,4 +144,5 @@ No inputs.
141144
## Outputs
142145

143146
No outputs.
147+
144148
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Taskfile.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ tasks:
2424
cmds:
2525
- pre-commit run -a
2626

27-
push:
28-
cmds:
29-
- git push
30-
- git tag -s {{.CLI_ARGS}} -m "{{.CLI_ARGS}}"
31-
- git push --tags
32-
3327
tag:
3428
cmds:
3529
- git push

package.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)