Skip to content

Commit 67939d4

Browse files
committed
feat: improved pre-commit workflows
1 parent da5369a commit 67939d4

File tree

3 files changed

+18
-32
lines changed

3 files changed

+18
-32
lines changed

.github/workflows/commitizen.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323
token: "${{ secrets.access-token }}"
24+
2425
- id: cz
2526
name: Create bump and changelog
2627
uses: commitizen-tools/commitizen-action@master
2728
with:
2829
github_token: ${{ secrets.access-token }}
30+
2931
- name: Print Version
3032
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"

.github/workflows/pre-commit-auth.yaml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,16 @@ jobs:
2121
uses: actions/setup-python@v5
2222

2323
- name: Install terraform-docs
24-
shell: bash
25-
run: |
26-
mkdir -p "$HOME/.local/bin" downloads
27-
curl -Lso ./downloads/terraform-docs.tar.gz \
28-
https://github.com/terraform-docs/terraform-docs/releases/download/v0.17.0/terraform-docs-v0.17.0-$(uname)-amd64.tar.gz
29-
tar -xzf downloads/terraform-docs.tar.gz -C downloads
30-
chmod +x downloads/terraform-docs
31-
mv downloads/terraform-docs "$HOME/.local/bin/terraform-docs"
32-
rm -rf downloads
24+
uses: jaxxstorm/action-install-gh-release@v1.14.0
25+
with:
26+
repo: terraform-docs/terraform-docs
27+
tag: v0.17.0
3328

3429
- name: Install tflint
35-
shell: bash
36-
run: |
37-
mkdir -p "$HOME/.local/bin" downloads
38-
curl -Lso ./downloads/install_linux.sh \
39-
https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh
40-
TFLINT_INSTALL_PATH="$HOME/.local/bin" bash ./downloads/install_linux.sh
41-
rm -rf downloads
30+
uses: jaxxstorm/action-install-gh-release@v1.14.0
31+
with:
32+
repo: terraform-linters/tflint
33+
tag: v0.55.1
4234

4335
- name: Run pre-commit hooks
4436
uses: pre-commit/action@v3.0.1

.github/workflows/pre-commit.yaml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,16 @@ jobs:
1515
uses: actions/setup-python@v5
1616

1717
- name: Install terraform-docs
18-
shell: bash
19-
run: |
20-
mkdir -p "$HOME/.local/bin" downloads
21-
curl -Lso ./downloads/terraform-docs.tar.gz \
22-
https://github.com/terraform-docs/terraform-docs/releases/download/v0.17.0/terraform-docs-v0.17.0-$(uname)-amd64.tar.gz
23-
tar -xzf downloads/terraform-docs.tar.gz -C downloads
24-
chmod +x downloads/terraform-docs
25-
mv downloads/terraform-docs "$HOME/.local/bin/terraform-docs"
26-
rm -rf downloads
18+
uses: jaxxstorm/action-install-gh-release@v1.14.0
19+
with:
20+
repo: terraform-docs/terraform-docs
21+
tag: v0.17.0
2722

2823
- name: Install tflint
29-
shell: bash
30-
run: |
31-
mkdir -p "$HOME/.local/bin" downloads
32-
curl -Lso ./downloads/install_linux.sh \
33-
https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh
34-
TFLINT_INSTALL_PATH="$HOME/.local/bin" bash ./downloads/install_linux.sh
35-
rm -rf downloads
24+
uses: jaxxstorm/action-install-gh-release@v1.14.0
25+
with:
26+
repo: terraform-linters/tflint
27+
tag: v0.55.1
3628

3729
- name: Run pre-commit hooks
3830
uses: pre-commit/action@v3.0.1

0 commit comments

Comments
 (0)