ci: fix hcl lock files on renovate branch

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2022-11-29 18:18:20 +01:00
parent 48e0b3a9cd
commit 688003cdd9

View File

@ -41,6 +41,7 @@ jobs:
exit $result
- name: Check HCL lock files are up to date
id: hcl-lock
shell: bash
run: |
dirs=$( find . -type f -name "*.lock.hcl" -exec dirname "{}" \; | sort -ud)
@ -50,3 +51,12 @@ jobs:
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
- name: Push changes on renovate
if: ${{ failure() && (steps.hcl-lock.conclusion == 'failure') && startsWith(github.head_ref, 'renovate/') }}
shell: bash
run: |
git config --global user.name "renovate[bot]"
git config --global user.email "29139614+renovate[bot]@users.noreply.github.com"
git commit -am "[bot] Update HCL lock files"
git push