Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/lock-terraform-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on: # yamllint disable-line rule:truthy
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
pull_request:
paths:
# Ensure the workflow is run if it has been changed.
- .github/workflows/lock-terraform-providers.yml
- terraform/.terraform.lock.hcl

# Set a default shell for any run steps. The `-Eueo pipefail` sets errtrace,
Expand Down Expand Up @@ -55,8 +57,10 @@ jobs:
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
lock-providers:
# Prevent the workflow from running if the trigger was a previous workflow run that
# updated the lock file.
if: ${{ github.actor != 'github-actions[bot]' }}
# updated the lock file or if the run is from a fork.
if: >-
(github.actor != 'github-actions[bot]')
&& (github.event.pull_request.head.repo.full_name == github.repository)
needs:
- diagnostics
permissions:
Expand Down Expand Up @@ -97,6 +101,7 @@ jobs:
# Needed by stefanzweifel/git-auto-commit-action to support the pull_request
# trigger.
ref: ${{ github.head_ref }}
token: ${{ secrets.GHA_AUTO_COMMIT_TOKEN || github.token }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
Expand Down
17 changes: 16 additions & 1 deletion terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading