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

Fix terraform-docs workflow branch name check #36

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

Stretch96
Copy link
Member

  • For PRs, github.ref returns the format refs/pull/{pull_request_number}/merge, which isn't what we want
  • This fixes it by getting the branch name using ${GITHUB_REF#refs/heads/} in a previous step, then checking the name in the terraform docs steps

* For PRs, `github.ref` returns the format `refs/pull/{pull_request_number}/merge`, which isn't what we want
* This fixes it by getting the branch name using `${GITHUB_REF#refs/heads/}` in a previous step, then checking the name in the terraform docs steps
Copy link
Contributor

@DrizzlyOwl DrizzlyOwl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Shame about the repetition. I wonder if we can extract the renovate specific ones into their own workflow so its separate to the linting tasks

@Stretch96
Copy link
Member Author

Terraform docs relies on terraform init being ran, so I've put them in the same workflow
I'm not sure if we did run it in a separate workflow (which ran after the validate workflow), that it would use the same generated output from terraform init, or if we'd have to run that again

@Stretch96 Stretch96 merged commit 5ff2b0c into main Oct 16, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants