Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: set TF_ACC_TERRAFORM_VERSION in workflow instead of repo variable #2550

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

BBBmau
Copy link
Contributor

@BBBmau BBBmau commented Jul 15, 2024

Description

configuration variables have a limited scope, preventing them from being used in pull requests. This causes the Deferred Actions workflow to fail since ${{ vars.TERRAFORM_VERSION_EXP }} doesn't return the version but instead just an empty string. This is a known issue across github: https://github.com/orgs/community/discussions/44322

This is seen in a recent review of a PR: https://github.com/hashicorp/terraform-provider-helm/actions/runs/9781860920/job/27387198282?pr=1247

Solution is to explicitly set it in the workflow rather than rely on a repo variable.

We can see the new workflow passing here: I triggered a dispatch where the input for the version is empty, this would then use the explicit tf version that's set in this PR. https://github.com/hashicorp/terraform-provider-helm/actions/runs/9959691833/job/27517098279

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

...

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@BBBmau BBBmau merged commit ddfbfb4 into main Jul 16, 2024
11 checks passed
@BBBmau BBBmau deleted the set-tf-version-explicit-dfa branch July 16, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants