Compare commits

...

43 commits

Author SHA1 Message Date
kvendingoldo
682111edbb
Merge pull request #48 from tofuutils/dependabot/github_actions/MaxymVlasov/dive-action-1.5.1
gh-actions: bump MaxymVlasov/dive-action from 1.5.0 to 1.5.1
2025-10-13 16:44:01 +04:00
dependabot[bot]
a3716be334
gh-actions: bump MaxymVlasov/dive-action from 1.5.0 to 1.5.1
Bumps [MaxymVlasov/dive-action](https://github.com/maxymvlasov/dive-action) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/maxymvlasov/dive-action/releases)
- [Commits](b08c8287e6...fafb796951)

---
updated-dependencies:
- dependency-name: MaxymVlasov/dive-action
  dependency-version: 1.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 12:21:03 +00:00
kvendingoldo
8ad84a44ef
Merge pull request #47 from tofuutils/dependabot/github_actions/cycjimmy/semantic-release-action-5.0.2
gh-actions: bump cycjimmy/semantic-release-action from 5.0.1 to 5.0.2
2025-10-10 19:10:36 +04:00
dependabot[bot]
430f50f0bd
gh-actions: bump cycjimmy/semantic-release-action from 5.0.1 to 5.0.2
Bumps [cycjimmy/semantic-release-action](https://github.com/cycjimmy/semantic-release-action) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/cycjimmy/semantic-release-action/releases)
- [Changelog](https://github.com/cycjimmy/semantic-release-action/blob/main/docs/CHANGELOG.md)
- [Commits](ebcbc66374...ba330626c4)

---
updated-dependencies:
- dependency-name: cycjimmy/semantic-release-action
  dependency-version: 5.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-10 11:22:34 +00:00
kvendingoldo
93e26a60e7
Merge pull request #46 from tofuutils/dependabot/github_actions/cycjimmy/semantic-release-action-5.0.1
gh-actions: bump cycjimmy/semantic-release-action from 5.0.0 to 5.0.1
2025-10-09 19:59:42 +04:00
dependabot[bot]
211d65d43d
gh-actions: bump cycjimmy/semantic-release-action from 5.0.0 to 5.0.1
Bumps [cycjimmy/semantic-release-action](https://github.com/cycjimmy/semantic-release-action) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/cycjimmy/semantic-release-action/releases)
- [Changelog](https://github.com/cycjimmy/semantic-release-action/blob/main/docs/CHANGELOG.md)
- [Commits](9cc899c47e...ebcbc66374)

---
updated-dependencies:
- dependency-name: cycjimmy/semantic-release-action
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-09 11:22:49 +00:00
kvendingoldo
16b5e9c289
Merge pull request #40 from tofuutils/dependabot/github_actions/cycjimmy/semantic-release-action-5.0.0
gh-actions: bump cycjimmy/semantic-release-action from 4.2.2 to 5.0.0
2025-10-02 14:38:22 +04:00
kvendingoldo
65db8f537f
Merge pull request #43 from tofuutils/dependabot/github_actions/tj-actions/changed-files-47.0.0
gh-actions: bump tj-actions/changed-files from 46.0.5 to 47.0.0
2025-09-15 20:58:34 +04:00
dependabot[bot]
f9d6074ab0
gh-actions: bump tj-actions/changed-files from 46.0.5 to 47.0.0
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 46.0.5 to 47.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](ed68ef82c0...24d32ffd49)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: 47.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 12:30:24 +00:00
kvendingoldo
701ddd21e1
Merge pull request #41 from tofuutils/dependabot/github_actions/actions/setup-python-6.0.0
gh-actions: bump actions/setup-python from 5.6.0 to 6.0.0
2025-09-04 22:51:34 +04:00
kvendingoldo
ecabde1843
Merge pull request #42 from tofuutils/dependabot/github_actions/actions/stale-10.0.0
gh-actions: bump actions/stale from 9.1.0 to 10.0.0
2025-09-04 22:51:28 +04:00
dependabot[bot]
f2b0eb603a
gh-actions: bump actions/stale from 9.1.0 to 10.0.0
Bumps [actions/stale](https://github.com/actions/stale) from 9.1.0 to 10.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](5bef64f19d...3a9db7e6a4)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 14:02:40 +00:00
dependabot[bot]
84d857a5ae
gh-actions: bump actions/setup-python from 5.6.0 to 6.0.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.6.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](a26af69be9...e797f83bcb)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 13:18:51 +00:00
dependabot[bot]
a4ae94e826
gh-actions: bump cycjimmy/semantic-release-action from 4.2.2 to 5.0.0
Bumps [cycjimmy/semantic-release-action](https://github.com/cycjimmy/semantic-release-action) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/cycjimmy/semantic-release-action/releases)
- [Changelog](https://github.com/cycjimmy/semantic-release-action/blob/main/docs/CHANGELOG.md)
- [Commits](16ca923e6c...9cc899c47e)

---
updated-dependencies:
- dependency-name: cycjimmy/semantic-release-action
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-01 23:11:04 +00:00
kvendingoldo
d581d5f42f
Merge pull request #39 from tofuutils/dependabot/github_actions/amannn/action-semantic-pull-request-6.1.1
gh-actions: bump amannn/action-semantic-pull-request from 5.5.3 to 6.1.1
2025-08-23 13:42:59 +04:00
dependabot[bot]
f81b28692c
gh-actions: bump amannn/action-semantic-pull-request from 5.5.3 to 6.1.1
Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 5.5.3 to 6.1.1.
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](0723387faa...48f256284b)

---
updated-dependencies:
- dependency-name: amannn/action-semantic-pull-request
  dependency-version: 6.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-22 11:43:05 +00:00
kvendingoldo
4a08fa44c1
Merge pull request #35 from tofuutils/dependabot/github_actions/actions/checkout-5
gh-actions: bump actions/checkout from 4 to 5
2025-08-13 02:24:15 +04:00
dependabot[bot]
b2658a3f8e
gh-actions: bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 17:26:54 +00:00
kvendingoldo
3357820262
Merge pull request #32 from telepath/patch-1
Update README.md
2025-07-12 03:39:29 +04:00
kvendingoldo
bac5ee6be0
Merge pull request #33 from tofuutils/dependabot/github_actions/cycjimmy/semantic-release-action-4.2.2
gh-actions: bump cycjimmy/semantic-release-action from 4.2.1 to 4.2.2
2025-07-08 17:45:49 +04:00
dependabot[bot]
977d08e2d1
gh-actions: bump cycjimmy/semantic-release-action from 4.2.1 to 4.2.2
Bumps [cycjimmy/semantic-release-action](https://github.com/cycjimmy/semantic-release-action) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/cycjimmy/semantic-release-action/releases)
- [Changelog](https://github.com/cycjimmy/semantic-release-action/blob/main/docs/CHANGELOG.md)
- [Commits](c4a2fa8906...16ca923e6c)

---
updated-dependencies:
- dependency-name: cycjimmy/semantic-release-action
  dependency-version: 4.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-07 14:24:37 +00:00
Benjamin Richter
d94583baf8
Update README.md
fix tofu_fmt heading
2025-06-18 12:24:20 +02:00
kvendingoldo
2bb866f953
Merge pull request #31 from tofuutils/dependabot/github_actions/cycjimmy/semantic-release-action-4.2.1
gh-actions: bump cycjimmy/semantic-release-action from 4.2.0 to 4.2.1
2025-06-09 20:46:17 +04:00
dependabot[bot]
407a900bbc
gh-actions: bump cycjimmy/semantic-release-action from 4.2.0 to 4.2.1
Bumps [cycjimmy/semantic-release-action](https://github.com/cycjimmy/semantic-release-action) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/cycjimmy/semantic-release-action/releases)
- [Changelog](https://github.com/cycjimmy/semantic-release-action/blob/main/docs/CHANGELOG.md)
- [Commits](0a51e81a6b...c4a2fa8906)

---
updated-dependencies:
- dependency-name: cycjimmy/semantic-release-action
  dependency-version: 4.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-09 12:28:37 +00:00
semantic-release-bot
04bfdda8eb chore(release): version 2.2.1 [skip ci]
## [2.2.1](https://github.com/tofuutils/pre-commit-opentofu/compare/v2.2.0...v2.2.1) (2025-06-04)

### Bug Fixes

* make infracost_breakdown.sh compatible with bash 3.2 (macOS) ([df886fa](df886fa772))
* Update pre-commit/action version ([#30](https://github.com/tofuutils/pre-commit-opentofu/issues/30)) ([44c7b5d](44c7b5dec9))
2025-06-04 08:26:32 +00:00
df886fa772 fix: make infracost_breakdown.sh compatible with bash 3.2 (macOS)
- Replace mapfile with while-read loop for bash 3.2 compatibility
- Fix substring expressions to avoid negative indices:
  (${check: -1} => ${check:$((${#check}-1)):1})
- Replace negative array indexing with explicit length calculation
- Maintain identical functionality while supporting macOS default bash
  version

Signed-off-by: Oliver Ladner <waste@lugh.ch>
2025-06-04 10:26:05 +02:00
Nikolai Mishin
44c7b5dec9
fix: Update pre-commit/action version (#30)
This is needed to switch to the new cache:
https://gh.io/gha-cache-sunset

Signed-off-by: Nikolai Mishin <sanduku.default@gmail.com>
2025-06-04 00:11:35 +02:00
kvendingoldo
b73207253f
Merge pull request #26 from tofuutils/dependabot/github_actions/actions/stale-9.1.0
gh-actions: bump actions/stale from 9.0.0 to 9.1.0
2025-06-02 20:15:04 +04:00
kvendingoldo
f5f4fdf330
Merge pull request #27 from tofuutils/dependabot/github_actions/actions/setup-python-5.6.0
gh-actions: bump actions/setup-python from 5.0.0 to 5.6.0
2025-06-02 20:14:59 +04:00
kvendingoldo
5f888bddf6
Merge pull request #29 from tofuutils/dependabot/github_actions/tj-actions/changed-files-46
gh-actions: bump tj-actions/changed-files from 26.1 to 46
2025-06-02 20:14:53 +04:00
dependabot[bot]
98a556422a
gh-actions: bump tj-actions/changed-files from 26.1 to 46
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 26.1 to 46.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](58ae566dc6...ed68ef82c0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: '46'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 12:20:13 +00:00
dependabot[bot]
ed9b22cc37
gh-actions: bump actions/setup-python from 5.0.0 to 5.6.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.6.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](0a5c615913...a26af69be9)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 12:16:54 +00:00
dependabot[bot]
8604934d93
gh-actions: bump actions/stale from 9.0.0 to 9.1.0
Bumps [actions/stale](https://github.com/actions/stale) from 9.0.0 to 9.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](28ca103628...5bef64f19d)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 9.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 12:10:49 +00:00
kvendingoldo
16722bff5a
Merge pull request #25 from tofuutils/dependabot/github_actions/amannn/action-semantic-pull-request-5.5.3
gh-actions: bump amannn/action-semantic-pull-request from 5.4.0 to 5.5.3
2025-06-02 01:29:49 +04:00
kvendingoldo
7eab6411d6
Merge pull request #24 from tofuutils/dependabot/github_actions/tj-actions/changed-files-26.1
gh-actions: bump tj-actions/changed-files from 13.1 to 26.1
2025-06-02 01:29:42 +04:00
kvendingoldo
da8319297d
Merge pull request #23 from tofuutils/dependabot/github_actions/MaxymVlasov/dive-action-1.5.0
gh-actions: bump MaxymVlasov/dive-action from 0.1.0 to 1.5.0
2025-06-02 01:29:33 +04:00
kvendingoldo
b27ad3a24a
Merge pull request #22 from tofuutils/dependabot/github_actions/cycjimmy/semantic-release-action-4.2.0
gh-actions: bump cycjimmy/semantic-release-action from 4.0.0 to 4.2.0
2025-06-02 01:29:25 +04:00
dependabot[bot]
df38ee3d39 gh-actions: bump pre-commit/action from 2.0.3 to 3.0.1
Bumps [pre-commit/action](https://github.com/pre-commit/action) from 2.0.3 to 3.0.1.
- [Release notes](https://github.com/pre-commit/action/releases)
- [Commits](9b88afc9cd...2c7b3805fd)

---
updated-dependencies:
- dependency-name: pre-commit/action
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-01 14:20:11 +02:00
dependabot[bot]
10393e2209
gh-actions: bump amannn/action-semantic-pull-request from 5.4.0 to 5.5.3
Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 5.4.0 to 5.5.3.
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](e9fabac35e...0723387faa)

---
updated-dependencies:
- dependency-name: amannn/action-semantic-pull-request
  dependency-version: 5.5.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-31 23:54:13 +00:00
dependabot[bot]
700b083394
gh-actions: bump tj-actions/changed-files from 13.1 to 26.1
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 13.1 to 26.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](2c85495a7b...58ae566dc6)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: '26.1'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-31 23:54:10 +00:00
dependabot[bot]
6be1b27016
gh-actions: bump MaxymVlasov/dive-action from 0.1.0 to 1.5.0
Bumps [MaxymVlasov/dive-action](https://github.com/maxymvlasov/dive-action) from 0.1.0 to 1.5.0.
- [Release notes](https://github.com/maxymvlasov/dive-action/releases)
- [Commits](0035999cae...b08c8287e6)

---
updated-dependencies:
- dependency-name: MaxymVlasov/dive-action
  dependency-version: 1.5.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-31 23:54:06 +00:00
dependabot[bot]
f8089e96a8
gh-actions: bump cycjimmy/semantic-release-action from 4.0.0 to 4.2.0
Bumps [cycjimmy/semantic-release-action](https://github.com/cycjimmy/semantic-release-action) from 4.0.0 to 4.2.0.
- [Release notes](https://github.com/cycjimmy/semantic-release-action/releases)
- [Changelog](https://github.com/cycjimmy/semantic-release-action/blob/main/docs/CHANGELOG.md)
- [Commits](61680d0e9b...0a51e81a6b)

---
updated-dependencies:
- dependency-name: cycjimmy/semantic-release-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-31 23:54:03 +00:00
Nikolai Mishin
0cbe561817
Create dependabot.yml 2025-06-01 01:53:20 +02:00
10 changed files with 41 additions and 18 deletions

10
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,10 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: /
schedule:
interval: daily
time: "11:00"
commit-message:
prefix: "gh-actions:"

View file

@ -9,13 +9,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Get changed Dockerfile
id: changed-files-specific
uses: tj-actions/changed-files@2c85495a7bb72f2734cb5181e29b2ee5e08e61f7 # v13.1
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
with:
files: |
Dockerfile
@ -52,7 +52,7 @@ jobs:
- name: Dive - check image for waste files
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: MaxymVlasov/dive-action@0035999cae50d4ef657ac94be84f01812aa192a5 # v0.1.0
uses: MaxymVlasov/dive-action@fafb796951b322cc4926b8a5eafda89ab9de8edf # v1.5.1
with:
image: ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
config-file: ${{ github.workspace }}/.github/.dive-ci.yaml

View file

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

View file

@ -14,7 +14,7 @@ jobs:
steps:
# Please look up the latest version from
# https://github.com/amannn/action-semantic-pull-request/releases
- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

View file

@ -6,7 +6,7 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
@ -31,16 +31,16 @@ jobs:
curl -L "$(curl -s https://api.github.com/repos/hadolint/hadolint/releases/latest | grep -o -E -m 1 "https://.+?/hadolint-Linux-x86_64")" > hadolint \
&& chmod +x hadolint && sudo mv hadolint /usr/bin/
# Need to success pre-commit fix push
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
# Skip tofu_tflint which interferes to commit pre-commit auto-fixes
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.9'
- name: Execute pre-commit
uses: pre-commit/action@9b88afc9cd57fd75b655d5c71bd38146d07135fe # v2.0.3
uses: pre-commit/action@576ff52938d158a24ac7e009dfa94b1455e7df99
env:
SKIP: no-commit-to-branch,hadolint
with:
@ -49,7 +49,7 @@ jobs:
# Run only skipped checks
- name: Execute pre-commit check that have no auto-fixes
if: always()
uses: pre-commit/action@9b88afc9cd57fd75b655d5c71bd38146d07135fe # v2.0.3
uses: pre-commit/action@576ff52938d158a24ac7e009dfa94b1455e7df99
env:
SKIP: check-added-large-files,check-merge-conflict,check-vcs-permalinks,forbid-new-submodules,no-commit-to-branch,end-of-file-fixer,trailing-whitespace,check-yaml,check-merge-conflict,check-executables-have-shebangs,check-case-conflict,mixed-line-ending,detect-aws-credentials,detect-private-key,shfmt,shellcheck
with:

View file

@ -18,13 +18,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
fetch-depth: 0
- name: Release
uses: cycjimmy/semantic-release-action@61680d0e9b02ff86f5648ade99e01be17f0260a4 # v4.0.0
uses: cycjimmy/semantic-release-action@ba330626c4750c19d8299de843f05c7aa5574f62 # v5.0.2
with:
semantic_version: 18.0.0
extra_plugins: |

View file

@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Staling issues and PR's

View file

@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
## [2.2.1](https://github.com/tofuutils/pre-commit-opentofu/compare/v2.2.0...v2.2.1) (2025-06-04)
### Bug Fixes
* make infracost_breakdown.sh compatible with bash 3.2 (macOS) ([df886fa](https://github.com/tofuutils/pre-commit-opentofu/commit/df886fa772e7d1eedf5603327c0cf02968e7d779))
* Update pre-commit/action version ([#30](https://github.com/tofuutils/pre-commit-opentofu/issues/30)) ([44c7b5d](https://github.com/tofuutils/pre-commit-opentofu/commit/44c7b5dec9362d2fe7ed5e8786f4d95956791d3d))
# [2.2.0](https://github.com/tofuutils/pre-commit-opentofu/compare/v2.1.0...v2.2.0) (2025-03-29)

View file

@ -552,7 +552,7 @@ To replicate functionality in `tofu_docs` hook:
- --args=--config=.terraform-docs.yml
```
### terraftofu_fmtorm_fmt
### tofu_fmt
1. `tofu_fmt` supports custom arguments so you can pass [supported flags](https://www.terraform.io/docs/cli/commands/fmt.html#usage). Eg:

View file

@ -70,19 +70,24 @@ function infracost_breakdown_ {
# -h .totalHourlyCost > 0.1
# --hook-config=.currency == "USD"
first_char=${check:0:1}
last_char=${check: -1}
last_char=${check:$((${#check} - 1)):1}
if [ "$first_char" == "$last_char" ] && {
[ "$first_char" == '"' ] || [ "$first_char" == "'" ]
}; then
check="${check:1:-1}"
check="${check:1:$((${#check} - 2))}"
fi
mapfile -t operations < <(echo "$check" | grep -oE '[!<>=]{1,2}')
# Replace mapfile with while read loop for bash 3.2 compatibility
operations=()
while IFS= read -r line; do
operations+=("$line")
done < <(echo "$check" | grep -oE '[!<>=]{1,2}')
# Get the very last operator, that is used in comparison inside `jq` query.
# From the example below we need to pick the `>` which is in between `add` and `1000`,
# but not the `!=`, which goes earlier in the `jq` expression
# [.projects[].diff.totalMonthlyCost | select (.!=null) | tonumber] | add > 1000
operation=${operations[-1]}
operation=${operations[$((${#operations[@]} - 1))]}
IFS="$operation" read -r -a jq_check <<< "$check"
real_value="$(jq "${jq_check[0]}" <<< "$RESULTS")"