mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Merge pull request #10625 from github/henti/ql_jobrunson
Added job.getRunsOn
This commit is contained in:
@@ -93,6 +93,9 @@ module Actions {
|
||||
|
||||
/** Gets the value of the `if` field in this job, if any. */
|
||||
JobIf getIf() { result.getJob() = this }
|
||||
|
||||
/** Gets the value of the `runs-on` field in this job. */
|
||||
JobRunson getRunsOn() { result.getJob() = this }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -108,6 +111,19 @@ module Actions {
|
||||
Job getJob() { result = job }
|
||||
}
|
||||
|
||||
/**
|
||||
* A `runs-on` within a job.
|
||||
* See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on.
|
||||
*/
|
||||
class JobRunson extends YamlNode, YamlScalar {
|
||||
Job job;
|
||||
|
||||
JobRunson() { job.lookup("runs-on") = this }
|
||||
|
||||
/** Gets the step this field belongs to. */
|
||||
Job getJob() { result = job }
|
||||
}
|
||||
|
||||
/**
|
||||
* A step within an Actions job.
|
||||
* See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idsteps.
|
||||
|
||||
Reference in New Issue
Block a user