mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
ci: check hcl lock files are up to date
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
1663b3d795
commit
48e0b3a9cd
13
.github/workflows/test-tf.yml
vendored
13
.github/workflows/test-tf.yml
vendored
@ -8,9 +8,11 @@ on:
|
||||
- "release/**"
|
||||
paths:
|
||||
- "**.tf"
|
||||
- "**.lock.hcl"
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.tf"
|
||||
- "**.lock.hcl"
|
||||
|
||||
jobs:
|
||||
tfsec:
|
||||
@ -37,3 +39,14 @@ jobs:
|
||||
terraform -chdir="$dir" validate -no-color || result=1
|
||||
done
|
||||
exit $result
|
||||
|
||||
- name: Check HCL lock files are up to date
|
||||
shell: bash
|
||||
run: |
|
||||
dirs=$( find . -type f -name "*.lock.hcl" -exec dirname "{}" \; | sort -ud)
|
||||
for dir in $dirs; do
|
||||
echo "Checking $dir"
|
||||
terraform -chdir="$dir" init
|
||||
terraform -chdir="$dir" providers lock -platform=linux_arm64 -platform=linux_amd64 -platform=darwin_arm64 -platform=darwin_amd64 -platform=windows_amd64
|
||||
done
|
||||
git diff --exit-code
|
||||
|
Loading…
Reference in New Issue
Block a user