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: backport with condition #711

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

Yaiba
Copy link
Contributor

@Yaiba Yaiba commented May 9, 2024

This add a condition on backport action, so it only runs when pr is merged and has a label like backport-to-

@@ -9,6 +9,7 @@ jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
if: github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'backport-to-')
Copy link
Member

Choose a reason for hiding this comment

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

So was the example yml file no good because "labeled" in the type causes the action to run when the label is added, not just merging a PR with the label? That's screwy, but oh well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, here https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#label it explains it, I think we don't want that behavior.
But in any case, we cannot avoid this workflow got triggerred every time there is a pr got merged

@Yaiba Yaiba merged commit c2cf22f into kwilteam:main May 9, 2024
1 check 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