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: condition for branch target changed to be either ref or workflow ref #126

Conversation

gentlementlegen
Copy link
Member

@gentlementlegen gentlementlegen commented Jan 15, 2025

@gentlementlegen gentlementlegen marked this pull request as ready for review January 15, 2025 15:38
Copy link
Member

@whilefoo whilefoo left a comment

Choose a reason for hiding this comment

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

If I understand correctly, because this workflow gets triggered after another workflow run, github.ref will always be the default branch of the repo instead of the branch that Update Configuration and Buildran on, so you can get that branch inworkflow_run.head_branch`?

@gentlementlegen
Copy link
Member Author

@whilefoo correct, please refer to https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_run

github.ref would have the proper value if the build is manually triggered, and defaults to the default branch when following a workflow_run.

@gentlementlegen gentlementlegen merged commit d556b02 into ubiquity-os-marketplace:development Jan 16, 2025
2 checks passed
@gentlementlegen gentlementlegen deleted the fix/deployment-branch branch January 16, 2025 11:04
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.

Check deployment target branch
2 participants