-
Notifications
You must be signed in to change notification settings - Fork 195
Add manual trigger for CI #7268
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
Intended to allow running CI on PRs that are not directly targeted to master or a feature branch, without requiring CI on all such PRs.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7268 +/- ##
=======================================
Coverage 41.31% 41.31%
=======================================
Files 2174 2174
Lines 190514 190514
=======================================
+ Hits 78705 78712 +7
+ Misses 105227 105219 -8
- Partials 6582 6583 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -17,6 +17,7 @@ on: | |||
merge_group: | |||
branches: | |||
- master | |||
workflow_dispatch: |
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.
Not sure but I think we need to provide a way to communicate the branch we want to test here. We are running this from the Actions tab, not from a PR. How does the action know which branch/tag it is running CI against?
There is the default Use workflow from
selector which selects which workflow file to use, but I'm not sure if that selection is the same variable as is used by (for example) the Checkout action (my impression from some brief reading is that they are different).
The CD workflow has a similar pattern and it configures a separate input, then uses it within the jobs defined in the workflow.
workflow_dispatch:
inputs:
tag:
description: 'Tag/commit'
required: true
type: string
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.
Hm, I was assuming that the Use workflow from
selector was the same used by the Checkout action; otherwise how does the checkout action know what to checkout at all, given the current ci.yml
doesn't use the same inputs/tag
field and doesn't specify which branch to run from?
Unfortunately I haven't been able to find clear information in github's documentation or elsewhere...
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.
how does the checkout action know what to checkout at all, given the current ci.yml doesn't use the same inputs/tag field and doesn't specify which branch to run from?
From their README:
# The branch, tag or SHA to checkout. When checking out the repository that
# triggered a workflow, this defaults to the reference or SHA for that event.
# Otherwise, uses the default branch.
ref: ''
My reading of this is that when the workflow is triggered from an event associated with a branch (PR push), then actions default to using the reference from the event. Otherwise it will use the repo's default branch.
@sjonpaulbrown The PR discussing manually running CI. To me it seems we would need to add a 'ref/commit/branch' field for the manual workflow to run on, similar to some other workflows, but I'm not sure how we would set it up such that it doesn't affect the regular CI runs. |
Intended to allow running CI tests on PRs that are not directly targeted to master or a feature branch, without requiring CI on all such PRs.