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

Re-fixed github actions tag handling #3768

Merged
merged 4 commits into from
Nov 17, 2023

Conversation

david-driscoll
Copy link
Contributor

So similar changes to this were provided in PR #3033 (fix for #2838) however the changes Azure Pipelines caused it to quickly be reverted (#3081, #3082, #3083). While I believe the Azure Pipelines issues were genuine, I don't believe the changes for Github Actions had any issues (that I'm aware of) however it currently causes mass headache when trying to push preview releases.

This change reintroduces only the github action changes. I suspect the changes to Gitlab and others might still apply, however I would rather they get added as separate PRs in the event that one of them triggers another revert.

Description

Updates the GitHubActions build agent to properly handle both tag builds and pull request builds based on the github actions docs.

See: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables

Related Issue

#2838, #3033, #3653

Motivation and Context

Today github actions cannot properly create a tagged preview build because the version comes out and some form of 1.5.0-tags-v1-5-0-preview-6.1 where the real base branch is not properly detected

How Has This Been Tested?

Changes are based off the original PR with some changes based on additional environment variables that exist in a Github Action Runner environment (event name, ref type, head ref, etc)

Screenshots (if appropriate):

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

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

LGTM!

@asbjornu asbjornu merged commit d762e0f into GitTools:main Nov 17, 2023
105 checks passed
Copy link
Contributor

mergify bot commented Nov 17, 2023

Thank you @david-driscoll for your contribution!

@arturcic arturcic added this to the 6.x milestone Nov 17, 2023
@arturcic arturcic modified the milestones: 6.x, 6.0.0-beta.4 Dec 12, 2023
@arturcic
Copy link
Member

🎉 This issue has been resolved in version 6.0.0-beta.4 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

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.

3 participants