-
Notifications
You must be signed in to change notification settings - Fork 402
T8105: Modify workflows failed due to pullrequest_target change #4906
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
Conversation
It is required to change this workflow to be called by another workflow - trigger-package-smoketest.yml.
Use one file for all branches to trigger the package-smoketest.yml workflow.
Specify the workflow location in "./package-smoketest.yml" format to show that it is a local workflow.
Use full path for local workflows
Removed conditional smoketest jobs for specific branches and simplified to a single smoketest job. No need to specify a branch when local workflow is called.
|
👍 |
|
@kumvijaya Could you please review this approach? |
kumvijaya
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.
Can approve as this needs quick-fix.
But reusable workflow to be kept in .github repo (not on same repo)
|
@kumvijaya |
Change this workflow to trigger the reusable workflow from "vyos/.github" repo.
Delete .github/workflows/package-smoketest.yml. It was moved to another repository. It will be used as a reusable workflow from that repo.
Change the workflow to run the branch-specific reusable workflow.
c-po
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.
The package smoketest workflow is ONLY required in vyos-1x repo - is it really necessary to make it an overcomplicated re-usable workflow?
Agree. If it is used only in this repo, can avoid creating reusable workflow. |
|
@c-po @kumvijaya I think we should have the same logic for other branches, in this case it is ok to move that file to other repo. To have the same location for all repos. |
I strongly disagree as the logic becomes overly complex for no reason. |
|
I am closing this PR, this issue will be resolved by another PR. |
Change summary
The pull_request_target workflows are now evaluated against the base repository’s default branch for branch protections and environment rules, not the pull request’s target branch.
It is required to change the structure to have only 1 common file for all branches. This workflow should call a branch-specific workflow to run tests. In these changes I use a local workflow of a branch (the branch is not specified in the workflow path). According to the GitHub documentation it should call a workflow of the same branch, if a local workflow specified. Let's try this approach to fix current problem.
Types of changes
Related Task(s)
Related PR(s)
How to test / Smoketest result
Checklist: