-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
🧪 Run gh release w/o Git in CI/CD
#13942
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
🧪 Run gh release w/o Git in CI/CD
#13942
Conversation
It is possible to use `gh release create --repo=` [[1]] so that GH CLI does not need to infer the repository information from the Git repository. GH CLI supports passing such options via environment values [[2]], which is what this patch makes use of. It's a follow-up for pytest-dev#13891. [1]: https://cli.github.com/manual/gh_release_create [2]: https://cli.github.com/manual/gh_help_environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes the create-github-release job in the CI/CD workflow by removing the unnecessary Git repository checkout. By setting the GH_REPO environment variable, the GitHub CLI can create releases without needing to infer repository information from a local Git clone.
Key Changes:
- Removed the
actions/checkout@v5step from thecreate-github-releasejob - Added
GH_REPOenvironment variable to supportgh release createwithout local Git repository
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bluetech
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Backport to 9.0.x: 💚 backport PR created✅ Backport PR branch: Backported as #13947 🤖 @patchback |
* 🧪 Run `gh release` w/o Git in CI/CD It is possible to use `gh release create --repo=` [[1]] so that GH CLI does not need to infer the repository information from the Git repository. GH CLI supports passing such options via environment values [[2]], which is what this patch makes use of. It's a follow-up for #13891. [1]: https://cli.github.com/manual/gh_release_create [2]: https://cli.github.com/manual/gh_help_environment * 📝 Add a change note for PRs #13942 and #13891 (cherry picked from commit 21ad5c6)
* 🧪 Run `gh release` w/o Git in CI/CD It is possible to use `gh release create --repo=` [[1]] so that GH CLI does not need to infer the repository information from the Git repository. GH CLI supports passing such options via environment values [[2]], which is what this patch makes use of. It's a follow-up for #13891. [1]: https://cli.github.com/manual/gh_release_create [2]: https://cli.github.com/manual/gh_help_environment * 📝 Add a change note for PRs #13942 and #13891 (cherry picked from commit 21ad5c6) Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <webknjaz@redhat.com>
It is possible to use
gh release create --repo=[1] so that GH CLI does not need to infer the repository information from the Git repository.GH CLI supports passing such options via environment values [2], which is what this patch makes use of.
It's a follow-up for #13891.