Skip to content

Commit 153b1d5

Browse files
committed
Add step to update .terraform.lock.hcl
1 parent bb8f08c commit 153b1d5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/bump.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,23 @@ jobs:
3232
run: |
3333
sed -i 's|github.com/MaterializeInc/terraform-helm-materialize?ref=v[0-9.]*|github.com/MaterializeInc/terraform-helm-materialize?ref=${{ steps.get_version.outputs.VERSION }}|' main.tf
3434
35+
- name: Setup Terraform
36+
uses: hashicorp/setup-terraform@v3
37+
with:
38+
terraform_version: "~1.0"
39+
terraform_wrapper: false
40+
41+
- name: Update .terraform.lock.hcl
42+
run: |
43+
# Initialize Terraform to update the lock file
44+
terraform init -upgrade
45+
46+
# If lock file doesn't exist yet (unlikely but possible)
47+
if [ ! -f .terraform.lock.hcl ]; then
48+
echo "No lock file found. Creating it with terraform init."
49+
terraform init
50+
fi
51+
3552
- name: Create Pull Request
3653
uses: peter-evans/create-pull-request@v6
3754
with:
@@ -41,7 +58,7 @@ jobs:
4158
body: |
4259
Updates terraform-helm-materialize module to version ${{ steps.get_version.outputs.VERSION }}.
4360
44-
This PR was automatically generated.
61+
This PR was automatically generated and includes updated .terraform.lock.hcl file.
4562
commit-message: "chore: bump terraform-helm-materialize to ${{ steps.get_version.outputs.VERSION }}"
4663
committer: GitHub <noreply@github.com>
4764
author: GitHub <noreply@github.com>

0 commit comments

Comments
 (0)