feat: Organization RunnerDeployment with webhook-based autoscaling only for certain repositories (#766)

Resolves #765

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
Tarasovych
2021-08-31 03:46:36 +03:00
committed by GitHub
parent d9df455781
commit 7008b0c257
9 changed files with 76 additions and 7 deletions

View File

@@ -84,6 +84,10 @@ type CheckRunSpec struct {
// Note that check_run name seem to equal to the job name you've defined in your actions workflow yaml file.
// So it is very likely that you can utilize this to trigger depending on the job.
Names []string `json:"names,omitempty"`
// Repositories is a list of GitHub repositories.
// Any check_run event whose repository matches one of repositories in the list can trigger autoscaling.
Repositories []string `json:"repositories,omitempty"`
}
// https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request

View File

@@ -71,6 +71,11 @@ func (in *CheckRunSpec) DeepCopyInto(out *CheckRunSpec) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Repositories != nil {
in, out := &in.Repositories, &out.Repositories
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckRunSpec.