@actions/languageserver 0.3.39 → 0.3.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.bundle.cjs +433 -286
- package/package.json +4 -4
package/dist/cli.bundle.cjs
CHANGED
|
@@ -3320,13 +3320,13 @@ var require_main2 = __commonJS({
|
|
|
3320
3320
|
}
|
|
3321
3321
|
DiagnosticRelatedInformation2.is = is;
|
|
3322
3322
|
})(DiagnosticRelatedInformation = exports3.DiagnosticRelatedInformation || (exports3.DiagnosticRelatedInformation = {}));
|
|
3323
|
-
var
|
|
3324
|
-
(function(
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
})(
|
|
3323
|
+
var DiagnosticSeverity5;
|
|
3324
|
+
(function(DiagnosticSeverity6) {
|
|
3325
|
+
DiagnosticSeverity6.Error = 1;
|
|
3326
|
+
DiagnosticSeverity6.Warning = 2;
|
|
3327
|
+
DiagnosticSeverity6.Information = 3;
|
|
3328
|
+
DiagnosticSeverity6.Hint = 4;
|
|
3329
|
+
})(DiagnosticSeverity5 = exports3.DiagnosticSeverity || (exports3.DiagnosticSeverity = {}));
|
|
3330
3330
|
var DiagnosticTag;
|
|
3331
3331
|
(function(DiagnosticTag2) {
|
|
3332
3332
|
DiagnosticTag2.Unnecessary = 1;
|
|
@@ -18761,7 +18761,6 @@ function objectAccess(obj, idx) {
|
|
|
18761
18761
|
var allFeatureKeys = [
|
|
18762
18762
|
"missingInputsQuickfix",
|
|
18763
18763
|
"blockScalarChompingWarning",
|
|
18764
|
-
"actionScaffoldingSnippets",
|
|
18765
18764
|
"allowCaseFunction"
|
|
18766
18765
|
];
|
|
18767
18766
|
var FeatureFlags = class {
|
|
@@ -21475,7 +21474,7 @@ var TemplateSchema = class _TemplateSchema {
|
|
|
21475
21474
|
TemplateSchema._definitionNamePattern = /^[a-zA-Z_][a-zA-Z0-9_-]*$/;
|
|
21476
21475
|
|
|
21477
21476
|
// ../workflow-parser/dist/workflow-v1.0.min.json
|
|
21478
|
-
var workflow_v1_0_min_default = { version: "workflow-v1.0", definitions: { "workflow-root": { description: "A workflow file.", mapping: { properties: { on: "on", name: "workflow-name", description: "workflow-description", "run-name": "run-name", defaults: "workflow-defaults", env: "workflow-env", permissions: "permissions", concurrency: "workflow-concurrency", jobs: { type: "jobs", required: true } } } }, "workflow-root-strict": { description: "Workflow file with strict validation", mapping: { properties: { on: { type: "on-strict", required: true }, name: "workflow-name", description: "workflow-description", "run-name": "run-name", defaults: "workflow-defaults", env: "workflow-env", permissions: "permissions", concurrency: "workflow-concurrency", jobs: { type: "jobs", required: true } } } }, "workflow-name": { description: "The name of the workflow that GitHub displays on your repository's 'Actions' tab.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#name)", string: {} }, "workflow-description": { description: "A description for your workflow or reusable workflow", string: {} }, "run-name": { context: ["github", "inputs", "vars"], string: {}, description: "The name for workflow runs generated from the workflow. GitHub displays the workflow run name in the list of workflow runs on your repository's 'Actions' tab.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#run-name)" }, on: { description: "The GitHub event that triggers the workflow. Events can be a single string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. View a full list of [events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows).\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#on)", "one-of": ["string", "sequence", "on-mapping"] }, "on-mapping": { mapping: { properties: { workflow_call: "workflow-call" }, "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, "on-strict": { description: "The GitHub event that triggers the workflow. Events can be a single string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. View a full list of [events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows).\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#on)", "one-of": ["on-string-strict", "on-sequence-strict", "on-mapping-strict"] }, "on-mapping-strict": { description: "The GitHub event that triggers the workflow. Events can be a single string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. View a full list of [events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows).\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#on)", mapping: { properties: { branch_protection_rule: "branch-protection-rule", check_run: "check-run", check_suite: "check-suite", create: "create", delete: "delete", deployment: "deployment", deployment_status: "deployment-status", discussion: "discussion", discussion_comment: "discussion-comment", fork: "fork", gollum: "gollum", image_version: "image-version", issue_comment: "issue-comment", issues: "issues", label: "label", merge_group: "merge-group", milestone: "milestone", page_build: "page-build", project: "project", project_card: "project-card", project_column: "project-column", public: "public", pull_request: "pull-request", pull_request_comment: "pull-request-comment", pull_request_review: "pull-request-review", pull_request_review_comment: "pull-request-review-comment", pull_request_target: "pull-request-target", push: "push", registry_package: "registry-package", release: "release", repository_dispatch: "repository-dispatch", schedule: "schedule", status: "status", watch: "watch", workflow_call: "workflow-call", workflow_dispatch: "workflow-dispatch", workflow_run: "workflow-run" } } }, "on-string-strict": { "one-of": ["branch-protection-rule-string", "check-run-string", "check-suite-string", "create-string", "delete-string", "deployment-string", "deployment-status-string", "discussion-string", "discussion-comment-string", "fork-string", "gollum-string", "image-version-string", "issue-comment-string", "issues-string", "label-string", "merge-group-string", "milestone-string", "page-build-string", "project-string", "project-card-string", "project-column-string", "public-string", "pull-request-string", "pull-request-comment-string", "pull-request-review-string", "pull-request-review-comment-string", "pull-request-target-string", "push-string", "registry-package-string", "release-string", "repository-dispatch-string", "schedule-string", "status-string", "watch-string", "workflow-call-string", "workflow-dispatch-string", "workflow-run-string"] }, "on-sequence-strict": { sequence: { "item-type": "on-string-strict" } }, "branch-protection-rule-string": { description: "Runs your workflow when branch protection rules in the workflow repository are changed.", string: { constant: "branch_protection_rule" } }, "branch-protection-rule": { description: "Runs your workflow when branch protection rules in the workflow repository are changed.", "one-of": ["null", "branch-protection-rule-mapping"] }, "branch-protection-rule-mapping": { mapping: { properties: { types: "branch-protection-rule-activity" } } }, "branch-protection-rule-activity": { description: "The types of branch protection rule activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["branch-protection-rule-activity-type", "branch-protection-rule-activity-types"] }, "branch-protection-rule-activity-types": { sequence: { "item-type": "branch-protection-rule-activity-type" } }, "branch-protection-rule-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "check-run-string": { description: "Runs your workflow when activity related to a check run occurs. A check run is an individual test that is part of a check suite.", string: { constant: "check_run" } }, "check-run": { description: "Runs your workflow when activity related to a check run occurs. A check run is an individual test that is part of a check suite.", "one-of": ["null", "check-run-mapping"] }, "check-run-mapping": { mapping: { properties: { types: "check-run-activity" } } }, "check-run-activity": { description: "The types of check run activity that trigger the workflow. Supported activity types: `created`, `rerequested`, `completed`, `requested_action`.", "one-of": ["check-run-activity-type", "check-run-activity-types"] }, "check-run-activity-types": { sequence: { "item-type": "check-run-activity-type" } }, "check-run-activity-type": { "allowed-values": ["completed", "created", "rerequested", "requested_action"] }, "check-suite-string": { description: "Runs your workflow when check suite activity occurs. A check suite is a collection of the check runs created for a specific commit. Check suites summarize the status and conclusion of the check runs that are in the suite.", string: { constant: "check_suite" } }, "check-suite": { description: "Runs your workflow when check suite activity occurs. A check suite is a collection of the check runs created for a specific commit. Check suites summarize the status and conclusion of the check runs that are in the suite.", "one-of": ["null", "check-suite-mapping"] }, "check-suite-mapping": { mapping: { properties: { types: "check-suite-activity" } } }, "check-suite-activity": { description: "The types of check suite activity that trigger the workflow. Supported activity types: `completed`.", "one-of": ["check-suite-activity-type", "check-suite-activity-types"] }, "check-suite-activity-types": { sequence: { "item-type": "check-suite-activity-type" } }, "check-suite-activity-type": { "allowed-values": ["completed"] }, "create-string": { description: "Runs your workflow when someone creates a Git reference (Git branch or tag) in the workflow's repository.", string: { constant: "create" } }, create: { description: "Runs your workflow when someone creates a Git reference (Git branch or tag) in the workflow's repository.", null: {} }, "delete-string": { description: "Runs your workflow when someone deletes a Git reference (Git branch or tag) in the workflow's repository.", string: { constant: "delete" } }, delete: { description: "Runs your workflow when someone deletes a Git reference (Git branch or tag) in the workflow's repository.", null: {} }, "deployment-string": { description: "Runs your workflow when someone creates a deployment in the workflow's repository. Deployments created with a commit SHA may not have a Git ref.", string: { constant: "deployment" } }, deployment: { description: "Runs your workflow when someone creates a deployment in the workflow's repository. Deployments created with a commit SHA may not have a Git ref.", null: {} }, "deployment-status-string": { description: "Runs your workflow when a third party provides a deployment status. Deployments created with a commit SHA may not have a Git ref.", string: { constant: "deployment_status" } }, "deployment-status": { description: "Runs your workflow when a third party provides a deployment status. Deployments created with a commit SHA may not have a Git ref.", null: {} }, "discussion-string": { description: "Runs your workflow when a discussion in the workflow's repository is created or modified. For activity related to comments on a discussion, use the `discussion_comment` event.", string: { constant: "discussion" } }, discussion: { description: "Runs your workflow when a discussion in the workflow's repository is created or modified. For activity related to comments on a discussion, use the `discussion_comment` event.", "one-of": ["null", "discussion-mapping"] }, "discussion-mapping": { mapping: { properties: { types: "discussion-activity" } } }, "discussion-activity": { description: "The types of discussion activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`, `transferred`, `pinned`, `unpinned`, `labeled`, `unlabeled`, `locked`, `unlocked`, `category_changed`, `answered`, `unanswered`.", "one-of": ["discussion-activity-type", "discussion-activity-types"] }, "discussion-activity-types": { sequence: { "item-type": "discussion-activity-type" } }, "discussion-activity-type": { "allowed-values": ["created", "edited", "deleted", "transferred", "pinned", "unpinned", "labeled", "unlabeled", "locked", "unlocked", "category_changed", "answered", "unanswered"] }, "discussion-comment-string": { description: "Runs your workflow when a comment on a discussion in the workflow's repository is created or modified. For activity related to a discussion as opposed to comments on the discussion, use the `discussion` event.", string: { constant: "discussion_comment" } }, "discussion-comment": { description: "Runs your workflow when a comment on a discussion in the workflow's repository is created or modified. For activity related to a discussion as opposed to comments on the discussion, use the `discussion` event.", "one-of": ["null", "discussion-comment-mapping"] }, "discussion-comment-mapping": { mapping: { properties: { types: "discussion-comment-activity" } } }, "discussion-comment-activity": { description: "The types of discussion comment activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["discussion-comment-activity-type", "discussion-comment-activity-types"] }, "discussion-comment-activity-types": { sequence: { "item-type": "discussion-comment-activity-type" } }, "discussion-comment-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "fork-string": { description: "Runs your workflow when someone forks a repository.", string: { constant: "fork" } }, fork: { description: "Runs your workflow when someone forks a repository.", null: {} }, "gollum-string": { description: "Runs your workflow when someone creates or updates a Wiki page.", string: { constant: "gollum" } }, gollum: { description: "Runs your workflow when someone creates or updates a Wiki page.", null: {} }, "image-version-string": { description: "Runs your workflow when an image version is created or changes state.", string: { constant: "image_version" } }, "image-version": { description: "Runs your workflow when an image version is created or changes state.", "one-of": ["null", "image-version-mapping"] }, "image-version-mapping": { mapping: { properties: { types: "image-version-activity", names: "event-names", versions: "event-versions" } } }, "image-version-activity": { description: "The types of image version activity that trigger the workflow. Supported activity types: `created`, `ready`, `deleted`.", "one-of": ["image-version-activity-type", "image-version-activity-types"] }, "image-version-activity-types": { sequence: { "item-type": "image-version-activity-type" } }, "image-version-activity-type": { "allowed-values": ["created", "ready", "deleted"] }, "issue-comment-string": { description: "Runs your workflow when an issue or pull request comment is created, edited, or deleted.", string: { constant: "issue_comment" } }, "issue-comment": { description: "Runs your workflow when an issue or pull request comment is created, edited, or deleted.", "one-of": ["null", "issue-comment-mapping"] }, "issue-comment-mapping": { mapping: { properties: { types: "issue-comment-activity" } } }, "issue-comment-activity": { description: "The types of issue comment activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["issue-comment-activity-type", "issue-comment-activity-types"] }, "issue-comment-activity-types": { sequence: { "item-type": "issue-comment-activity-type" } }, "issue-comment-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "issues-string": { description: "Runs your workflow when an issue in the workflow's repository is created or modified. For activity related to comments in an issue, use the `issue_comment` event.", string: { constant: "issues" } }, issues: { description: "Runs your workflow when an issue in the workflow's repository is created or modified. For activity related to comments in an issue, use the `issue_comment` event.", "one-of": ["null", "issues-mapping"] }, "issues-mapping": { mapping: { properties: { types: "issues-activity" } } }, "issues-activity": { description: "The types of issue activity that trigger the workflow. Supported activity types: `opened`, `edited`, `deleted`, `transferred`, `pinned`, `unpinned`, `closed`, `reopened`, `assigned`, `unassigned`, `labeled`, `unlabeled`, `locked`, `unlocked`, `milestoned`, `demilestoned`.", "one-of": ["issues-activity-type", "issues-activity-types"] }, "issues-activity-types": { sequence: { "item-type": "issues-activity-type" } }, "issues-activity-type": { "allowed-values": ["opened", "edited", "deleted", "transferred", "pinned", "unpinned", "closed", "reopened", "assigned", "unassigned", "labeled", "unlabeled", "locked", "unlocked", "milestoned", "demilestoned"] }, "label-string": { description: "Runs your workflow when a label in your workflow's repository is created or modified.", string: { constant: "label" } }, label: { description: "Runs your workflow when a label in your workflow's repository is created or modified.", "one-of": ["null", "label-mapping"] }, "label-mapping": { mapping: { properties: { types: "label-activity" } } }, "label-activity": { description: "The types of label activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["label-activity-type", "label-activity-types"] }, "label-activity-types": { sequence: { "item-type": "label-activity-type" } }, "label-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "merge-group-string": { description: "Runs your workflow when a pull request is added to a merge queue, which adds the pull request to a merge group.", string: { constant: "merge_group" } }, "merge-group": { description: "Runs your workflow when a pull request is added to a merge queue, which adds the pull request to a merge group.", "one-of": ["null", "merge-group-mapping"] }, "merge-group-mapping": { mapping: { properties: { types: "merge-group-activity", branches: "event-branches", "branches-ignore": "event-branches-ignore" } } }, "merge-group-activity": { description: "The types of merge group activity that trigger the workflow. Supported activity types: `checks_requested`.", "one-of": ["merge-group-activity-type", "merge-group-activity-types"] }, "merge-group-activity-types": { sequence: { "item-type": "merge-group-activity-type" } }, "merge-group-activity-type": { "allowed-values": ["checks_requested"] }, "milestone-string": { description: "Runs your workflow when a milestone in the workflow's repository is created or modified.", string: { constant: "milestone" } }, milestone: { description: "Runs your workflow when a milestone in the workflow's repository is created or modified.", "one-of": ["null", "milestone-mapping"] }, "milestone-mapping": { mapping: { properties: { types: "milestone-activity" } } }, "milestone-activity": { description: "The types of milestone activity that trigger the workflow. Supported activity types: `created`, `closed`, `opened`, `edited`, `deleted`.", "one-of": ["milestone-activity-type", "milestone-activity-types"] }, "milestone-activity-types": { sequence: { "item-type": "milestone-activity-type" } }, "milestone-activity-type": { "allowed-values": ["created", "closed", "opened", "edited", "deleted"] }, "page-build-string": { description: "Runs your workflow when someone pushes to a branch that is the publishing source for GitHub Pages, if GitHub Pages is enabled for the repository.", string: { constant: "page_build" } }, "page-build": { description: "Runs your workflow when someone pushes to a branch that is the publishing source for GitHub Pages, if GitHub Pages is enabled for the repository.", null: {} }, "project-string": { description: "Runs your workflow when a project board is created or modified. For activity related to cards or columns in a project board, use the `project_card` or `project_column` events instead.", string: { constant: "project" } }, project: { description: "Runs your workflow when a project board is created or modified. For activity related to cards or columns in a project board, use the `project_card` or `project_column` events instead.", "one-of": ["null", "project-mapping"] }, "project-mapping": { mapping: { properties: { types: "project-activity" } } }, "project-activity": { description: "The types of project activity that trigger the workflow. Supported activity types: `created`, `closed`, `reopened`, `edited`, `deleted`.", "one-of": ["project-activity-type", "project-activity-types"] }, "project-activity-types": { sequence: { "item-type": "project-activity-type" } }, "project-activity-type": { "allowed-values": ["created", "closed", "reopened", "edited", "deleted"] }, "project-card-string": { description: "Runs your workflow when a card on a project board is created or modified. For activity related to project boards or columns in a project board, use the `project` or `project_column` event instead.", string: { constant: "project_card" } }, "project-card": { description: "Runs your workflow when a card on a project board is created or modified. For activity related to project boards or columns in a project board, use the `project` or `project_column` event instead.", "one-of": ["null", "project-card-mapping"] }, "project-card-mapping": { mapping: { properties: { types: "project-card-activity" } } }, "project-card-activity": { description: "The types of project card activity that trigger the workflow. Supported activity types: `created`, `moved`, `converted`, `edited`, `deleted`.", "one-of": ["project-card-activity-type", "project-card-activity-types"] }, "project-card-activity-types": { sequence: { "item-type": "project-card-activity-type" } }, "project-card-activity-type": { "allowed-values": ["created", "moved", "converted", "edited", "deleted"] }, "project-column-string": { description: "Runs your workflow when a column on a project board is created or modified. For activity related to project boards or cards in a project board, use the `project` or `project_card` event instead.", string: { constant: "project_column" } }, "project-column": { description: "Runs your workflow when a column on a project board is created or modified. For activity related to project boards or cards in a project board, use the `project` or `project_card` event instead.", "one-of": ["null", "project-column-mapping"] }, "project-column-mapping": { mapping: { properties: { types: "project-column-activity" } } }, "project-column-activity": { description: "The types of project column activity that trigger the workflow. Supported activity types: `created`, `updated`, `moved`, `deleted`.", "one-of": ["project-column-activity-type", "project-column-activity-types"] }, "project-column-activity-types": { sequence: { "item-type": "project-column-activity-type" } }, "project-column-activity-type": { "allowed-values": ["created", "updated", "moved", "deleted"] }, "public-string": { description: "Runs your workflow when your workflow's repository changes from private to public.", string: { constant: "public" } }, public: { description: "Runs your workflow when your workflow's repository changes from private to public.", null: {} }, "pull-request-string": { description: "Runs your workflow when activity on a pull request in the workflow's repository occurs. If no activity types are specified, the workflow runs when a pull request is opened, reopened, or when the head branch of the pull request is updated.", string: { constant: "pull_request" } }, "pull-request": { description: "Runs your workflow when activity on a pull request in the workflow's repository occurs. If no activity types are specified, the workflow runs when a pull request is opened, reopened, or when the head branch of the pull request is updated.", "one-of": ["null", "pull-request-mapping"] }, "pull-request-mapping": { mapping: { properties: { types: "pull-request-activity", branches: "event-branches", "branches-ignore": "event-branches-ignore", paths: "event-paths", "paths-ignore": "event-paths-ignore" } } }, "pull-request-activity": { description: "The types of pull request activity that trigger the workflow. Supported activity types: `assigned`, `unassigned`, `labeled`, `unlabeled`, `opened`, `edited`, `closed`, `reopened`, `synchronize`, `converted_to_draft`, `locked`, `unlocked`, `enqueued`, `dequeued`, `milestoned`, `demilestoned`, `ready_for_review`, `review_requested`, `review_request_removed`, `auto_merge_enabled`, `auto_merge_disabled`.", "one-of": ["pull-request-activity-type", "pull-request-activity-types"] }, "pull-request-activity-types": { sequence: { "item-type": "pull-request-activity-type" } }, "pull-request-activity-type": { "allowed-values": ["assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "closed", "reopened", "synchronize", "converted_to_draft", "locked", "unlocked", "enqueued", "dequeued", "milestoned", "demilestoned", "ready_for_review", "review_requested", "review_request_removed", "auto_merge_enabled", "auto_merge_disabled"] }, "pull-request-comment-string": { description: "Please use the `issue_comment` event instead.", string: { constant: "pull_request_comment" } }, "pull-request-comment": { description: "Please use the `issue_comment` event instead.", "one-of": ["null", "issue-comment-mapping"] }, "pull-request-review-string": { description: "Runs your workflow when a pull request review is submitted, edited, or dismissed. A pull request review is a group of pull request review comments in addition to a body comment and a state. For activity related to pull request review comments or pull request comments, use the `pull_request_review_comment` or `issue_comment` events instead.", string: { constant: "pull_request_review" } }, "pull-request-review": { description: "Runs your workflow when a pull request review is submitted, edited, or dismissed. A pull request review is a group of pull request review comments in addition to a body comment and a state. For activity related to pull request review comments or pull request comments, use the `pull_request_review_comment` or `issue_comment` events instead.", "one-of": ["null", "pull-request-review-mapping"] }, "pull-request-review-mapping": { mapping: { properties: { types: "pull-request-review-activity" } } }, "pull-request-review-activity": { description: "The types of pull request review activity that trigger the workflow. Supported activity types: `submitted`, `edited`, `dismissed`.", "one-of": ["pull-request-review-activity-type", "pull-request-review-activity-types"] }, "pull-request-review-activity-types": { sequence: { "item-type": "pull-request-review-activity-type" } }, "pull-request-review-activity-type": { "allowed-values": ["submitted", "edited", "dismissed"] }, "pull-request-review-comment-string": { description: "", string: { constant: "pull_request_review_comment" } }, "pull-request-review-comment": { description: "", "one-of": ["null", "pull-request-review-comment-mapping"] }, "pull-request-review-comment-mapping": { mapping: { properties: { types: "pull-request-review-comment-activity" } } }, "pull-request-review-comment-activity": { description: "The types of pull request review comment activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["pull-request-review-comment-activity-type", "pull-request-review-comment-activity-types"] }, "pull-request-review-comment-activity-types": { sequence: { "item-type": "pull-request-review-comment-activity-type" } }, "pull-request-review-comment-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "pull-request-target-string": { description: "Runs your workflow when activity on a pull request in the workflow's repository occurs. If no activity types are specified, the workflow runs when a pull request is opened, reopened, or when the head branch of the pull request is updated.\n\nThis event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the `pull_request` event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request.", string: { constant: "pull_request_target" } }, "pull-request-target": { description: "Runs your workflow when activity on a pull request in the workflow's repository occurs. If no activity types are specified, the workflow runs when a pull request is opened, reopened, or when the head branch of the pull request is updated.\n\nThis event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the `pull_request` event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request.", "one-of": ["null", "pull-request-target-mapping"] }, "pull-request-target-mapping": { mapping: { properties: { types: "pull-request-target-activity", branches: "event-branches", "branches-ignore": "event-branches-ignore", paths: "event-paths", "paths-ignore": "event-paths-ignore" } } }, "pull-request-target-activity": { description: "The types of pull request activity that trigger the workflow. Supported activity types: `assigned`, `unassigned`, `labeled`, `unlabeled`, `opened`, `edited`, `closed`, `reopened`, `synchronize`, `converted_to_draft`, `locked`, `unlocked`, `enqueued`, `dequeued`, `milestoned`, `demilestoned`, `ready_for_review`, `review_requested`, `review_request_removed`, `auto_merge_enabled`, `auto_merge_disabled`.", "one-of": ["pull-request-target-activity-type", "pull-request-target-activity-types"] }, "pull-request-target-activity-types": { sequence: { "item-type": "pull-request-target-activity-type" } }, "pull-request-target-activity-type": { "allowed-values": ["assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "closed", "reopened", "synchronize", "converted_to_draft", "locked", "unlocked", "enqueued", "dequeued", "milestoned", "demilestoned", "ready_for_review", "review_requested", "review_request_removed", "auto_merge_enabled", "auto_merge_disabled"] }, "push-string": { description: "Runs your workflow when you push a commit or tag.", string: { constant: "push" } }, push: { description: "Runs your workflow when you push a commit or tag.", "one-of": ["null", "push-mapping"] }, "push-mapping": { mapping: { properties: { branches: "event-branches", "branches-ignore": "event-branches-ignore", tags: "event-tags", "tags-ignore": "event-tags-ignore", paths: "event-paths", "paths-ignore": "event-paths-ignore" } } }, "registry-package-string": { description: "Runs your workflow when activity related to GitHub Packages occurs in your repository.", string: { constant: "registry_package" } }, "registry-package": { description: "Runs your workflow when activity related to GitHub Packages occurs in your repository.", "one-of": ["null", "registry-package-mapping"] }, "registry-package-mapping": { mapping: { properties: { types: "registry-package-activity" } } }, "registry-package-activity": { description: "The types of registry package activity that trigger the workflow. Supported activity types: `published`, `updated`.", "one-of": ["registry-package-activity-type", "registry-package-activity-types"] }, "registry-package-activity-types": { sequence: { "item-type": "registry-package-activity-type" } }, "registry-package-activity-type": { "allowed-values": ["published", "updated"] }, "release-string": { description: "Runs your workflow when release activity in your repository occurs.", string: { constant: "release" } }, release: { description: "Runs your workflow when release activity in your repository occurs.", "one-of": ["null", "release-mapping"] }, "release-mapping": { mapping: { properties: { types: "release-activity" } } }, "release-activity": { description: "The types of release activity that trigger the workflow. Supported activity types: `published`, `unpublished`, `created`, `edited`, `deleted`, `prereleased`, `released`.", "one-of": ["release-activity-type", "release-activity-types"] }, "release-activity-types": { sequence: { "item-type": "release-activity-type" } }, "release-activity-type": { "allowed-values": ["published", "unpublished", "created", "edited", "deleted", "prereleased", "released"] }, "schedule-string": { description: "The `schedule` event allows you to trigger a workflow at a scheduled time.\n\nYou can schedule a workflow to run at specific UTC times using POSIX cron syntax. Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes. GitHub Actions does not support the non-standard syntax `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`, and `@reboot`.", string: { constant: "schedule" } }, schedule: { description: "The `schedule` event allows you to trigger a workflow at a scheduled time.\n\nYou can schedule a workflow to run at specific UTC times using POSIX cron syntax. Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes. GitHub Actions does not support the non-standard syntax `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`, and `@reboot`.", sequence: { "item-type": "cron-mapping" } }, "status-string": { description: "Runs your workflow when the status of a Git commit changes. For example, commits can be marked as `error`, `failure`, `pending`, or `success`. If you want to provide more details about the status change, you may want to use the `check_run` event.", string: { constant: "status" } }, status: { description: "Runs your workflow when the status of a Git commit changes. For example, commits can be marked as `error`, `failure`, `pending`, or `success`. If you want to provide more details about the status change, you may want to use the `check_run` event.", null: {} }, "watch-string": { description: "Runs your workflow when the workflow's repository is starred.", string: { constant: "watch" } }, watch: { description: "Runs your workflow when the workflow's repository is starred.", "one-of": ["null", "watch-mapping"] }, "watch-mapping": { mapping: { properties: { types: "watch-activity" } } }, "watch-activity": { description: "The types of watch activity that trigger the workflow. Supported activity types: `started`.", "one-of": ["watch-activity-type", "watch-activity-types"] }, "watch-activity-types": { sequence: { "item-type": "watch-activity-type" } }, "watch-activity-type": { "allowed-values": ["started"] }, "workflow-run-string": { description: "This event occurs when a workflow run is requested or completed. It allows you to execute a workflow based on execution or completion of another workflow. The workflow started by the `workflow_run` event is able to access secrets and write tokens, even if the previous workflow was not. This is useful in cases where the previous workflow is intentionally not privileged, but you need to take a privileged action in a later workflow.", string: { constant: "workflow_run" } }, "workflow-run": { description: "This event occurs when a workflow run is requested or completed. It allows you to execute a workflow based on execution or completion of another workflow. The workflow started by the `workflow_run` event is able to access secrets and write tokens, even if the previous workflow was not. This is useful in cases where the previous workflow is intentionally not privileged, but you need to take a privileged action in a later workflow.", "one-of": ["null", "workflow-run-mapping"] }, "workflow-run-mapping": { mapping: { properties: { types: "workflow-run-activity", workflows: "workflow-run-workflows", branches: "event-branches", "branches-ignore": "event-branches-ignore" } } }, "workflow-run-workflows": { description: "The name of the workflow that triggers the `workflow_run` event. The workflow must be in the same repository as the workflow that uses the `workflow_run` event.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "workflow-run-activity": { description: "The types of workflow run activity that trigger the workflow. Supported activity types: `completed`, `requested`, `in_progress`.", "one-of": ["workflow-run-activity-type", "workflow-run-activity-types"] }, "workflow-run-activity-types": { sequence: { "item-type": "workflow-run-activity-type" } }, "workflow-run-activity-type": { "allowed-values": ["requested", "completed", "in_progress"] }, "event-branches": { description: "Use the `branches` filter when you want to include branch name patterns or when you want to both include and exclude branch name patterns. You cannot use both the `branches` and `branches-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-branches-ignore": { description: "Use the `branches-ignore` filter when you only want to exclude branch name patterns. You cannot use both the `branches` and `branches-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-names": { description: "Use the `names` filter when you want to include names via patterns or when you want to both include and exclude names using patterns. ", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-tags": { description: "Use the `tags` filter when you want to include tag name patterns or when you want to both include and exclude tag names patterns. You cannot use both the `tags` and `tags-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-tags-ignore": { description: "Use the `tags-ignore` filter when you only want to exclude tag name patterns. You cannot use both the `tags` and `tags-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-paths": { description: "Use the `paths` filter when you want to include file path patterns or when you want to both include and exclude file path patterns. You cannot use both the `paths` and `paths-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-paths-ignore": { description: "Use the `paths-ignore` filter when you only want to exclude file path patterns. You cannot use both the `paths` and `paths-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-versions": { description: "Use the `versions` filter when you want to include versions via patterns or when you want to both include and exclude versions using patterns. ", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "repository-dispatch-string": { description: "You can use the GitHub API to trigger a webhook event called `repository_dispatch` when you want to trigger a workflow for activity that happens outside of GitHub.", string: { constant: "branch_protection_rule" } }, "repository-dispatch": { description: "You can use the GitHub API to trigger a webhook event called `repository_dispatch` when you want to trigger a workflow for activity that happens outside of GitHub.", "one-of": ["null", "repository-dispatch-mapping"] }, "repository-dispatch-mapping": { mapping: { properties: { types: "sequence-of-non-empty-string" } } }, "workflow-call-string": { description: "The `workflow_call` event is used to indicate that a workflow can be called by another workflow. When a workflow is triggered with the `workflow_call` event, the event payload in the called workflow is the same event payload from the calling workflow.", string: { constant: "workflow_call" } }, "workflow-call": { description: "The `workflow_call` event is used to indicate that a workflow can be called by another workflow. When a workflow is triggered with the `workflow_call` event, the event payload in the called workflow is the same event payload from the calling workflow.", "one-of": ["null", "workflow-call-mapping"] }, "workflow-call-mapping": { mapping: { properties: { inputs: "workflow-call-inputs", secrets: "workflow-call-secrets", outputs: "workflow-call-outputs" } } }, "workflow-call-inputs": { description: "Inputs that are passed to the called workflow from the caller workflow.", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "workflow-call-input-definition" } }, "workflow-call-input-definition": { mapping: { properties: { description: { type: "string", description: "A string description of the input parameter." }, type: { type: "workflow-call-input-type", required: true }, required: { type: "boolean", description: "A boolean to indicate whether the action requires the input parameter. Set to `true` when the parameter is required." }, default: "workflow-call-input-default" } } }, "workflow-call-input-type": { description: "Required if input is defined for the `on.workflow_call` keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: `boolean`, `number`, or `string`.", "one-of": ["input-type-string", "input-type-boolean", "input-type-number"] }, "input-type-string": { string: { constant: "string" } }, "input-type-boolean": { string: { constant: "boolean" } }, "input-type-number": { string: { constant: "number" } }, "input-type-choice": { string: { constant: "choice" } }, "input-type-environment": { string: { constant: "environment" } }, "workflow-call-input-default": { description: 'If a `default` parameter is not set, the default value of the input is `false` for boolean, `0` for a number, and `""` for a string.', context: ["github", "inputs", "vars"], "one-of": ["string", "boolean", "number"] }, "workflow-call-secrets": { description: "A map of the secrets that can be used in the called workflow. Within the called workflow, you can use the `secrets` context to refer to a secret.", mapping: { "loose-key-type": "workflow-call-secret-name", "loose-value-type": "workflow-call-secret-definition" } }, "workflow-call-secret-name": { string: { "require-non-empty": true }, description: "A string identifier to associate with the secret." }, "workflow-call-secret-definition": { "one-of": ["null", "workflow-call-secret-mapping-definition"] }, "workflow-call-secret-mapping-definition": { mapping: { properties: { description: { type: "string", description: "A string description of the secret parameter." }, required: { type: "boolean", description: "A boolean specifying whether the secret must be supplied." } } } }, "workflow-call-outputs": { description: "A reusable workflow may generate data that you want to use in the caller workflow. To use these outputs, you must specify them as the outputs of the reusable workflow.", mapping: { "loose-key-type": "workflow-call-output-name", "loose-value-type": "workflow-call-output-definition" } }, "workflow-call-output-name": { string: { "require-non-empty": true }, description: "A string identifier to associate with the output. The value of `<output_id>` is a map of the input's metadata. The `<output_id>` must be a unique identifier within the outputs object and must start with a letter or _ and contain only alphanumeric characters, -, or _." }, "workflow-call-output-definition": { mapping: { properties: { description: { type: "string", description: "A string description of the output parameter." }, value: { type: "workflow-output-context", required: true } } } }, "workflow-output-context": { description: "The value to assign to the output parameter.", context: ["github", "inputs", "vars", "jobs"], string: {} }, "workflow-dispatch-string": { description: "The `workflow_dispatch` event allows you to manually trigger a workflow run. A workflow can be manually triggered using the GitHub API, GitHub CLI, or GitHub browser interface.", string: { constant: "workflow_dispatch" } }, "workflow-dispatch": { description: "The `workflow_dispatch` event allows you to manually trigger a workflow run. A workflow can be manually triggered using the GitHub API, GitHub CLI, or GitHub browser interface.", "one-of": ["null", "workflow-dispatch-mapping"] }, "workflow-dispatch-mapping": { mapping: { properties: { inputs: "workflow-dispatch-inputs" } } }, "workflow-dispatch-inputs": { description: "You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow. When you trigger the event, you can provide the `ref` and any `inputs`. When the workflow runs, you can access the input values in the `inputs` context.", mapping: { "loose-key-type": "workflow-dispatch-input-name", "loose-value-type": "workflow-dispatch-input" } }, "workflow-dispatch-input-name": { string: { "require-non-empty": true }, description: "A string identifier to associate with the input. The value of <input_id> is a map of the input's metadata. The <input_id> must be a unique identifier within the inputs object. The <input_id> must start with a letter or _ and contain only alphanumeric characters, -, or _." }, "workflow-dispatch-input": { mapping: { properties: { description: { type: "string", description: "A string description of the input parameter." }, type: { type: "workflow-dispatch-input-type" }, required: { type: "boolean", description: "A boolean to indicate whether the workflow requires the input parameter. Set to true when the parameter is required." }, default: "workflow-dispatch-input-default", options: { type: "sequence-of-string", description: "The options of the dropdown list, if the type is a choice." } } } }, "workflow-dispatch-input-type": { description: "A string representing the type of the input. This must be one of: `boolean`, `number`, `string`, `choice`, or `environment`.", "one-of": ["input-type-string", "input-type-boolean", "input-type-number", "input-type-environment", "input-type-choice"] }, "workflow-dispatch-input-default": { description: "The default value is used when an input parameter isn't specified in a workflow file.", "one-of": ["string", "boolean", "number"] }, permissions: { description: "You can use `permissions` to modify the default permissions granted to the `GITHUB_TOKEN`, adding or removing access as required, so that you only allow the minimum required access.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#permissions)", "one-of": ["permissions-mapping", "permission-level-shorthand-read-all", "permission-level-shorthand-write-all"] }, "permissions-mapping": { mapping: { properties: { actions: { type: "permission-level-any", description: "Actions workflows, workflow runs, and artifacts." }, "artifact-metadata": { type: "permission-level-any", description: "Storage and deployment records for build artifacts." }, attestations: { type: "permission-level-any", description: "Artifact attestations." }, checks: { type: "permission-level-any", description: "Check runs and check suites." }, contents: { type: "permission-level-any", description: "Repository contents, commits, branches, downloads, releases, and merges." }, deployments: { type: "permission-level-any", description: "Deployments and deployment statuses." }, discussions: { type: "permission-level-any", description: "Discussions and related comments and labels." }, "id-token": { type: "permission-level-write-or-no-access", description: "Token to request an OpenID Connect token." }, issues: { type: "permission-level-any", description: "Issues and related comments, assignees, labels, and milestones." }, models: { type: "permission-level-read-or-no-access", description: "Call AI models with GitHub Models." }, packages: { type: "permission-level-any", description: "Packages published to the GitHub Package Platform." }, pages: { type: "permission-level-any", description: "Retrieve Pages statuses, configuration, and builds, as well as create new builds." }, "pull-requests": { type: "permission-level-any", description: "Pull requests and related comments, assignees, labels, milestones, and merges." }, "repository-projects": { type: "permission-level-any", description: "Classic projects within a repository." }, "security-events": { type: "permission-level-any", description: "Code scanning and Dependabot alerts." }, statuses: { type: "permission-level-any", description: "Commit statuses." } } } }, "permission-level-any": { description: "The permission level for the `GITHUB_TOKEN`.", "one-of": ["permission-level-read", "permission-level-write", "permission-level-no-access"] }, "permission-level-read-or-no-access": { "one-of": ["permission-level-read", "permission-level-no-access"] }, "permission-level-write-or-no-access": { "one-of": ["permission-level-write", "permission-level-no-access"] }, "permission-level-read": { description: "The permission level for the `GITHUB_TOKEN`. Grants `read` permission for the specified scope.", string: { constant: "read" } }, "permission-level-write": { description: "The permission level for the `GITHUB_TOKEN`. Grants `write` permission for the specified scope.", string: { constant: "write" } }, "permission-level-no-access": { description: "The permission level for the `GITHUB_TOKEN`. Restricts all access for the specified scope.", string: { constant: "none" } }, "permission-level-shorthand-read-all": { description: "The permission level for the `GITHUB_TOKEN`. Grants `read` access for all scopes.", string: { constant: "read-all" } }, "permission-level-shorthand-write-all": { description: "The permission level for the `GITHUB_TOKEN`. Grants `write` access for all scopes.", string: { constant: "write-all" } }, "workflow-defaults": { description: "Use `defaults` to create a map of default settings that will apply to all jobs in the workflow. You can also set default settings that are only available to a job.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#defaults)", mapping: { properties: { run: "workflow-defaults-run" } } }, "workflow-defaults-run": { mapping: { properties: { shell: "shell", "working-directory": "working-directory" } } }, "workflow-env": { description: "A map of environment variables that are available to the steps of all jobs in the workflow. You can also set environment variables that are only available to the steps of a single job or to a single step.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#env)", context: ["github", "inputs", "vars", "secrets"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, jobs: { description: "A workflow run is made up of one or more `jobs`, which run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the `jobs.<job_id>.needs` keyword. Each job runs in a runner environment specified by `runs-on`.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobs)", mapping: { "loose-key-type": "job-id", "loose-value-type": "job" } }, "job-id": { string: { "require-non-empty": true }, description: "A unique identifier for the job. The identifier must start with a letter or _ and contain only alphanumeric characters, -, or _." }, job: { description: "Each job must have an id to associate with the job. The key `job_id` is a string and its value is a map of the job's configuration data. You must replace `<job_id>` with a string that is unique to the jobs object. The `<job_id>` must start with a letter or _ and contain only alphanumeric characters, -, or _.", "one-of": ["job-factory", "workflow-job"] }, "job-factory": { mapping: { properties: { needs: "needs", if: "job-if", strategy: "strategy", name: { type: "string-strategy-context", description: "The name of the job displayed on GitHub." }, "runs-on": { type: "runs-on", required: true }, "timeout-minutes": { type: "number-strategy-context", description: "The maximum number of minutes to let a workflow run before GitHub automatically cancels it. Default: 360" }, "cancel-timeout-minutes": "number-strategy-context", "continue-on-error": { type: "boolean-strategy-context", description: "Prevents a workflow run from failing when a job fails. Set to true to allow a workflow run to pass when this job fails." }, container: "container", services: "services", env: "job-env", environment: "job-environment", permissions: "permissions", concurrency: "job-concurrency", outputs: "job-outputs", defaults: "job-defaults", steps: "steps", snapshot: "snapshot" } } }, "workflow-job": { mapping: { properties: { name: { type: "string-strategy-context", description: "The name of the job displayed on GitHub." }, uses: { description: "The location and version of a reusable workflow file to run as a job. Use one of the following formats:\n\n* `{owner}/{repo}/.github/workflows/{filename}@{ref}` for reusable workflows in public and private repositories.\n* `./.github/workflows/{filename}` for reusable workflows in the same repository.\n\n{ref} can be a SHA, a release tag, or a branch name. Using the commit SHA is the safest for stability and security.", type: "non-empty-string", required: true }, with: "workflow-job-with", secrets: "workflow-job-secrets", needs: "needs", if: "job-if", permissions: "permissions", concurrency: "job-concurrency", strategy: "strategy" } } }, "workflow-job-with": { description: "When a job is used to call a reusable workflow, you can use `with` to provide a map of inputs that are passed to the called workflow.\n\nAny inputs that you pass must match the input specifications defined in the called workflow.", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "scalar-needs-context" } }, "workflow-job-secrets": { description: "When a job is used to call a reusable workflow, you can use `secrets` to provide a map of secrets that are passed to the called workflow.\n\nAny secrets that you pass must match the names defined in the called workflow.", "one-of": ["workflow-job-secrets-mapping", "workflow-job-secrets-inherit"] }, "workflow-job-secrets-mapping": { mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "scalar-needs-context-with-secrets" } }, "workflow-job-secrets-inherit": { string: { constant: "inherit" } }, needs: { description: "Use `needs` to identify any jobs that must complete successfully before this job will run. It can be a string or array of strings. If a job fails, all jobs that need it are skipped unless the jobs use a conditional expression that causes the job to continue. If a run contains a series of jobs that need each other, a failure applies to all jobs in the dependency chain from the point of failure onwards.", "one-of": ["sequence-of-non-empty-string", "non-empty-string"] }, "job-if": { description: "You can use the `if` conditional to prevent a job from running unless a condition is met. You can use any supported context and expression to create a conditional.", context: ["github", "inputs", "vars", "needs", "always(0,0)", "failure(0,MAX)", "cancelled(0,0)", "success(0,MAX)"], string: {} }, "job-if-result": { context: ["github", "inputs", "vars", "needs", "always(0,0)", "failure(0,MAX)", "cancelled(0,0)", "success(0,MAX)"], "one-of": ["null", "boolean", "number", "string", "sequence", "mapping"] }, strategy: { description: "Use `strategy` to use a matrix strategy for your jobs. A matrix strategy lets you use variables in a single job definition to automatically create multiple job runs that are based on the combinations of the variables. ", context: ["github", "inputs", "vars", "needs"], mapping: { properties: { "fail-fast": { type: "boolean", description: "Setting `fail-fast` to `false` prevents GitHub from canceling all in-progress jobs if any matrix job fails. Default: `true`" }, "max-parallel": { type: "number", description: "The maximum number of jobs that can run simultaneously when using a matrix job strategy. By default, GitHub will maximize the number of jobs run in parallel depending on runner availability." }, matrix: "matrix" } } }, matrix: { description: "Use `matrix` to define a matrix of different job configurations. Within your matrix, define one or more variables followed by an array of values.", mapping: { properties: { include: { type: "matrix-filter", description: "Use `include` to expand existing matrix configurations or to add new configurations. The value of `include` is a list of objects.\n\nFor each object in the `include` list, the key:value pairs in the object will be added to each of the matrix combinations if none of the key:value pairs overwrite any of the original matrix values. If the object cannot be added to any of the matrix combinations, a new matrix combination will be created instead. Note that the original matrix values will not be overwritten, but added matrix values can be overwritten." }, exclude: { type: "matrix-filter", description: "To remove specific configurations defined in the matrix, use `exclude`. An excluded configuration only has to be a partial match for it to be excluded." } }, "loose-key-type": "non-empty-string", "loose-value-type": "sequence" } }, "matrix-filter": { sequence: { "item-type": "matrix-filter-item" } }, "matrix-filter-item": { mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, snapshot: { description: "Use `snapshot` to define a custom image you want to create or update after your job succeeds by taking a snapshot of your runner.", "one-of": ["non-empty-string", "snapshot-mapping"] }, "snapshot-mapping": { mapping: { properties: { "image-name": { description: "The desired name of the custom image you want to create or update.", type: "non-empty-string", required: true }, if: "snapshot-if", version: { description: "The desired major version updates upon a new custom image version creation.", type: "non-empty-string" } } } }, "snapshot-if": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], description: "Use the if conditional to prevent a snapshot from being taken unless a condition is met. Any supported context and expression can be used to create a conditional. Expressions in an `if` conditional do not require the bracketed expression syntax. When you use expressions in an `if` conditional, you may omit the expression syntax because GitHub automatically evaluates the `if` conditional as an expression.", string: {} }, "runs-on": { description: "Use `runs-on` to define the type of machine to run the job on.\n* The destination machine can be either a GitHub-hosted runner, larger runner, or a self-hosted runner.\n* You can target runners based on the labels assigned to them, or their group membership, or a combination of these.\n* You can provide `runs-on` as a single string or as an array of strings.\n* If you specify an array of strings, your workflow will execute on any runner that matches all of the specified `runs-on` values.\n* If you would like to run your workflow on multiple machines, use `jobs.<job_id>.strategy`.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["non-empty-string", "sequence-of-non-empty-string", "runs-on-mapping"] }, "runs-on-mapping": { mapping: { properties: { group: { description: "The group from which to select a runner.", type: "non-empty-string" }, labels: "runs-on-labels" } } }, "runs-on-labels": { description: "The label by which to filter for available runners.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "job-env": { description: "A map of variables that are available to all steps in the job.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, "workflow-concurrency": { description: "Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression.\n\nYou can also specify `concurrency` at the job level.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)", context: ["github", "inputs", "vars"], "one-of": ["string", "concurrency-mapping"] }, "job-concurrency": { description: "Concurrency ensures that only a single job using the same concurrency group will run at a time. A concurrency group can be any string or expression. The expression can use any context except for the `secrets` context.\n\nYou can also specify `concurrency` at the workflow level.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["non-empty-string", "concurrency-mapping"] }, "concurrency-mapping": { description: "Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression.\n\nYou can also specify `concurrency` at the job level.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)", mapping: { properties: { group: { type: "non-empty-string", required: true, description: "When a concurrent job or workflow is queued, if another job or workflow using the same concurrency group in the repository is in progress, the queued job or workflow will be `pending`. Any previously pending job or workflow in the concurrency group will be canceled. To also cancel any currently running job or workflow in the same concurrency group, specify `cancel-in-progress: true`." }, "cancel-in-progress": { type: "boolean", description: "To cancel any currently running job or workflow in the same concurrency group, specify cancel-in-progress: true." } } } }, "job-environment": { description: "The environment that the job references. All environment protection rules must pass before a job referencing the environment is sent to a runner.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["string", "job-environment-mapping"] }, "job-environment-mapping": { mapping: { properties: { name: { type: "job-environment-name", required: true }, url: { type: "string-runner-context-no-secrets", description: "The environment URL, which maps to `environment_url` in the deployments API." } } } }, "job-environment-name": { description: "The name of the environment used by the job.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], string: {} }, "job-defaults": { description: "A map of default settings that will apply to all steps in the job. You can also set default settings for the entire workflow.", mapping: { properties: { run: "job-defaults-run" } } }, "job-defaults-run": { context: ["github", "inputs", "vars", "strategy", "matrix", "needs", "env"], mapping: { properties: { shell: "shell", "working-directory": "working-directory" } } }, "job-outputs": { description: "A map of outputs for a called workflow. Called workflow outputs are available to all downstream jobs in the caller workflow. Each output has an identifier, an optional `description,` and a `value`. The `value` must be set to the value of an output from a job within the called workflow.", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string-runner-context" } }, steps: { description: "A job contains a sequence of tasks called `steps`. Steps can run commands, run setup tasks, or run an action in your repository, a public repository, or an action published in a Docker registry. Not all steps run actions, but all actions run as a step. Each step runs in its own process in the runner environment and has access to the workspace and filesystem. Because steps run in their own process, changes to environment variables are not preserved between steps. GitHub provides built-in steps to set up and complete a job. Must contain either `uses` or `run`.", sequence: { "item-type": "steps-item" } }, "steps-item": { "one-of": ["run-step", "regular-step"] }, "run-step": { mapping: { properties: { name: "step-name", id: "step-id", if: "step-if", "timeout-minutes": "step-timeout-minutes", run: { type: "string-steps-context", description: "Runs command-line programs using the operating system's shell. If you do not provide a `name`, the step name will default to the text specified in the `run` command. Commands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. Each `run` keyword represents a new process and shell in the virtual environment. When you provide multi-line commands, each line runs in the same shell.", required: true }, "continue-on-error": "step-continue-on-error", env: "step-env", "working-directory": "string-steps-context", shell: "shell" } } }, "regular-step": { mapping: { properties: { name: "step-name", id: "step-id", if: "step-if", "continue-on-error": "step-continue-on-error", "timeout-minutes": "step-timeout-minutes", uses: { type: "step-uses", required: true }, with: "step-with", env: "step-env" } } }, "step-uses": { description: "Selects an action to run as part of a step in your job. An action is a reusable unit of code. You can use an action defined in the same repository as the workflow, a public repository, or in a published Docker container image.", string: { "require-non-empty": true } }, "step-continue-on-error": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], boolean: {}, description: "Prevents a job from failing when a step fails. Set to `true` to allow a job to pass when this step fails." }, "step-id": { string: { "require-non-empty": true }, description: "A unique identifier for the step. You can use the `id` to reference the step in contexts." }, "step-if": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "steps", "job", "runner", "env", "always(0,0)", "failure(0,0)", "cancelled(0,0)", "success(0,0)", "hashFiles(1,255)"], description: "Use the `if` conditional to prevent a step from running unless a condition is met. Any supported context and expression can be used to create a conditional. Expressions in an `if` conditional do not require the bracketed expression syntax. When you use expressions in an `if` conditional, you may omit the expression syntax because GitHub automatically evaluates the `if` conditional as an expression.", string: {} }, "step-if-result": { context: ["github", "inputs", "vars", "strategy", "matrix", "steps", "job", "runner", "env", "always(0,0)", "failure(0,0)", "cancelled(0,0)", "success(0,0)", "hashFiles(1,255)"], "one-of": ["null", "boolean", "number", "string", "sequence", "mapping"] }, "step-env": { description: "Sets variables for steps to use in the runner environment. You can also set variables for the entire workflow or a job.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, "step-name": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], string: {}, description: "A name for your step to display on GitHub." }, "step-timeout-minutes": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], number: {}, description: "The maximum number of minutes to run the step before killing the process." }, "step-with": { description: "A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as variables. When you specify an input in a workflow file or use a default input value, GitHub creates a variable for the input with the name `INPUT_<VARIABLE_NAME>`. The variable created converts input names to uppercase letters and replaces spaces with `_`.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, container: { description: "A container to run any steps in a job that don't already specify a container. If you have steps that use both script and container actions, the container actions will run as sibling containers on the same network with the same volume mounts.\n\nIf you do not set a container, all steps will run directly on the host specified by runs-on unless a step refers to an action configured to run in a container.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["string", "container-mapping"] }, "container-mapping": { mapping: { properties: { image: { type: "non-empty-string", description: "Use `jobs.<job_id>.container.image` to define the Docker image to use as the container to run the action. The value can be the Docker Hub image or a registry name." }, options: { type: "non-empty-string", description: "Use `jobs.<job_id>.container.options` to configure additional Docker container resource options." }, env: "container-env", ports: { type: "sequence-of-non-empty-string", description: "Use `jobs.<job_id>.container.ports` to set an array of ports to expose on the container." }, volumes: { type: "sequence-of-non-empty-string", description: "Use `jobs.<job_id>.container.volumes` to set an array of volumes for the container to use. You can use volumes to share data between services or other steps in a job. You can specify named Docker volumes, anonymous Docker volumes, or bind mounts on the host." }, credentials: "container-registry-credentials" } } }, services: { description: "Additional containers to host services for a job in a workflow. These are useful for creating databases or cache services like redis. The runner on the virtual machine will automatically create a network and manage the life cycle of the service containers. When you use a service container for a job or your step uses container actions, you don't need to set port information to access the service. Docker automatically exposes all ports between containers on the same network. When both the job and the action run in a container, you can directly reference the container by its hostname. The hostname is automatically mapped to the service name. When a step does not use a container action, you must access the service using localhost and bind the ports.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "services-container" } }, "services-container": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["non-empty-string", "container-mapping"] }, "container-registry-credentials": { description: "If the image's container registry requires authentication to pull the image, you can use `jobs.<job_id>.container.credentials` to set a map of the username and password. The credentials are the same values that you would provide to the `docker login` command.", context: ["github", "inputs", "vars", "secrets", "env"], mapping: { properties: { username: "non-empty-string", password: "non-empty-string" } } }, "container-env": { description: "Use `jobs.<job_id>.container.env` to set a map of variables in the container.", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string-runner-context" } }, "non-empty-string": { string: { "require-non-empty": true } }, "sequence-of-non-empty-string": { sequence: { "item-type": "non-empty-string" } }, "sequence-of-string": { sequence: { "item-type": "string" } }, "boolean-needs-context": { context: ["github", "inputs", "vars", "needs"], boolean: {} }, "number-needs-context": { context: ["github", "inputs", "vars", "needs"], number: {} }, "string-needs-context": { context: ["github", "inputs", "vars", "needs"], string: {} }, "scalar-needs-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["string", "boolean", "number"] }, "scalar-needs-context-with-secrets": { context: ["github", "inputs", "vars", "needs", "secrets", "strategy", "matrix"], "one-of": ["string", "boolean", "number"] }, "boolean-strategy-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], boolean: {} }, "number-strategy-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], number: {} }, "string-strategy-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], string: {} }, "boolean-steps-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], boolean: {} }, "number-steps-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], number: {} }, "string-runner-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env"], string: {} }, "string-runner-context-no-secrets": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "steps", "job", "runner", "env"], string: {} }, "string-steps-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], string: {} }, shell: { string: { "require-non-empty": true }, description: "Use `shell` to override the default shell settings in the runner's operating system. You can use built-in shell keywords, or you can define a custom set of shell options. The shell command that is run internally executes a temporary file that contains the commands specified in `run`." }, "working-directory": { string: { "require-non-empty": true }, description: "The `working-directory` keyword specifies the working directory where the command is run." }, "cron-mapping": { mapping: { properties: { cron: "cron-pattern" } } }, "cron-pattern": { string: { "require-non-empty": true } } } };
|
|
21477
|
+
var workflow_v1_0_min_default = { version: "workflow-v1.0", definitions: { "workflow-root": { description: "A workflow file.", mapping: { properties: { on: "on", name: "workflow-name", description: "workflow-description", "run-name": "run-name", defaults: "workflow-defaults", env: "workflow-env", permissions: "permissions", concurrency: "workflow-concurrency", jobs: { type: "jobs", required: true } } } }, "workflow-root-strict": { description: "Workflow file with strict validation", mapping: { properties: { on: { type: "on-strict", required: true }, name: "workflow-name", description: "workflow-description", "run-name": "run-name", defaults: "workflow-defaults", env: "workflow-env", permissions: "permissions", concurrency: "workflow-concurrency", jobs: { type: "jobs", required: true } } } }, "workflow-name": { description: "The name of the workflow that GitHub displays on your repository's 'Actions' tab.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#name)", string: {} }, "workflow-description": { description: "A description for your workflow or reusable workflow", string: {} }, "run-name": { context: ["github", "inputs", "vars"], string: {}, description: "The name for workflow runs generated from the workflow. GitHub displays the workflow run name in the list of workflow runs on your repository's 'Actions' tab.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#run-name)" }, on: { description: "The GitHub event that triggers the workflow. Events can be a single string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. View a full list of [events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows).\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#on)", "one-of": ["string", "sequence", "on-mapping"] }, "on-mapping": { mapping: { properties: { workflow_call: "workflow-call" }, "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, "on-strict": { description: "The GitHub event that triggers the workflow. Events can be a single string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. View a full list of [events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows).\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#on)", "one-of": ["on-string-strict", "on-sequence-strict", "on-mapping-strict"] }, "on-mapping-strict": { description: "The GitHub event that triggers the workflow. Events can be a single string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. View a full list of [events that trigger workflows](https://docs.github.com/actions/using-workflows/events-that-trigger-workflows).\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#on)", mapping: { properties: { branch_protection_rule: "branch-protection-rule", check_run: "check-run", check_suite: "check-suite", create: "create", delete: "delete", deployment: "deployment", deployment_status: "deployment-status", discussion: "discussion", discussion_comment: "discussion-comment", fork: "fork", gollum: "gollum", image_version: "image-version", issue_comment: "issue-comment", issues: "issues", label: "label", merge_group: "merge-group", milestone: "milestone", page_build: "page-build", project: "project", project_card: "project-card", project_column: "project-column", public: "public", pull_request: "pull-request", pull_request_comment: "pull-request-comment", pull_request_review: "pull-request-review", pull_request_review_comment: "pull-request-review-comment", pull_request_target: "pull-request-target", push: "push", registry_package: "registry-package", release: "release", repository_dispatch: "repository-dispatch", schedule: "schedule", status: "status", watch: "watch", workflow_call: "workflow-call", workflow_dispatch: "workflow-dispatch", workflow_run: "workflow-run" } } }, "on-string-strict": { "one-of": ["branch-protection-rule-string", "check-run-string", "check-suite-string", "create-string", "delete-string", "deployment-string", "deployment-status-string", "discussion-string", "discussion-comment-string", "fork-string", "gollum-string", "image-version-string", "issue-comment-string", "issues-string", "label-string", "merge-group-string", "milestone-string", "page-build-string", "project-string", "project-card-string", "project-column-string", "public-string", "pull-request-string", "pull-request-comment-string", "pull-request-review-string", "pull-request-review-comment-string", "pull-request-target-string", "push-string", "registry-package-string", "release-string", "repository-dispatch-string", "schedule-string", "status-string", "watch-string", "workflow-call-string", "workflow-dispatch-string", "workflow-run-string"] }, "on-sequence-strict": { sequence: { "item-type": "on-string-strict" } }, "branch-protection-rule-string": { description: "Runs your workflow when branch protection rules in the workflow repository are changed.", string: { constant: "branch_protection_rule" } }, "branch-protection-rule": { description: "Runs your workflow when branch protection rules in the workflow repository are changed.", "one-of": ["null", "branch-protection-rule-mapping"] }, "branch-protection-rule-mapping": { mapping: { properties: { types: "branch-protection-rule-activity" } } }, "branch-protection-rule-activity": { description: "The types of branch protection rule activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["branch-protection-rule-activity-type", "branch-protection-rule-activity-types"] }, "branch-protection-rule-activity-types": { sequence: { "item-type": "branch-protection-rule-activity-type" } }, "branch-protection-rule-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "check-run-string": { description: "Runs your workflow when activity related to a check run occurs. A check run is an individual test that is part of a check suite.", string: { constant: "check_run" } }, "check-run": { description: "Runs your workflow when activity related to a check run occurs. A check run is an individual test that is part of a check suite.", "one-of": ["null", "check-run-mapping"] }, "check-run-mapping": { mapping: { properties: { types: "check-run-activity" } } }, "check-run-activity": { description: "The types of check run activity that trigger the workflow. Supported activity types: `created`, `rerequested`, `completed`, `requested_action`.", "one-of": ["check-run-activity-type", "check-run-activity-types"] }, "check-run-activity-types": { sequence: { "item-type": "check-run-activity-type" } }, "check-run-activity-type": { "allowed-values": ["completed", "created", "rerequested", "requested_action"] }, "check-suite-string": { description: "Runs your workflow when check suite activity occurs. A check suite is a collection of the check runs created for a specific commit. Check suites summarize the status and conclusion of the check runs that are in the suite.", string: { constant: "check_suite" } }, "check-suite": { description: "Runs your workflow when check suite activity occurs. A check suite is a collection of the check runs created for a specific commit. Check suites summarize the status and conclusion of the check runs that are in the suite.", "one-of": ["null", "check-suite-mapping"] }, "check-suite-mapping": { mapping: { properties: { types: "check-suite-activity" } } }, "check-suite-activity": { description: "The types of check suite activity that trigger the workflow. Supported activity types: `completed`.", "one-of": ["check-suite-activity-type", "check-suite-activity-types"] }, "check-suite-activity-types": { sequence: { "item-type": "check-suite-activity-type" } }, "check-suite-activity-type": { "allowed-values": ["completed"] }, "create-string": { description: "Runs your workflow when someone creates a Git reference (Git branch or tag) in the workflow's repository.", string: { constant: "create" } }, create: { description: "Runs your workflow when someone creates a Git reference (Git branch or tag) in the workflow's repository.", null: {} }, "delete-string": { description: "Runs your workflow when someone deletes a Git reference (Git branch or tag) in the workflow's repository.", string: { constant: "delete" } }, delete: { description: "Runs your workflow when someone deletes a Git reference (Git branch or tag) in the workflow's repository.", null: {} }, "deployment-string": { description: "Runs your workflow when someone creates a deployment in the workflow's repository. Deployments created with a commit SHA may not have a Git ref.", string: { constant: "deployment" } }, deployment: { description: "Runs your workflow when someone creates a deployment in the workflow's repository. Deployments created with a commit SHA may not have a Git ref.", null: {} }, "deployment-status-string": { description: "Runs your workflow when a third party provides a deployment status. Deployments created with a commit SHA may not have a Git ref.", string: { constant: "deployment_status" } }, "deployment-status": { description: "Runs your workflow when a third party provides a deployment status. Deployments created with a commit SHA may not have a Git ref.", null: {} }, "discussion-string": { description: "Runs your workflow when a discussion in the workflow's repository is created or modified. For activity related to comments on a discussion, use the `discussion_comment` event.", string: { constant: "discussion" } }, discussion: { description: "Runs your workflow when a discussion in the workflow's repository is created or modified. For activity related to comments on a discussion, use the `discussion_comment` event.", "one-of": ["null", "discussion-mapping"] }, "discussion-mapping": { mapping: { properties: { types: "discussion-activity" } } }, "discussion-activity": { description: "The types of discussion activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`, `transferred`, `pinned`, `unpinned`, `labeled`, `unlabeled`, `locked`, `unlocked`, `category_changed`, `answered`, `unanswered`.", "one-of": ["discussion-activity-type", "discussion-activity-types"] }, "discussion-activity-types": { sequence: { "item-type": "discussion-activity-type" } }, "discussion-activity-type": { "allowed-values": ["created", "edited", "deleted", "transferred", "pinned", "unpinned", "labeled", "unlabeled", "locked", "unlocked", "category_changed", "answered", "unanswered"] }, "discussion-comment-string": { description: "Runs your workflow when a comment on a discussion in the workflow's repository is created or modified. For activity related to a discussion as opposed to comments on the discussion, use the `discussion` event.", string: { constant: "discussion_comment" } }, "discussion-comment": { description: "Runs your workflow when a comment on a discussion in the workflow's repository is created or modified. For activity related to a discussion as opposed to comments on the discussion, use the `discussion` event.", "one-of": ["null", "discussion-comment-mapping"] }, "discussion-comment-mapping": { mapping: { properties: { types: "discussion-comment-activity" } } }, "discussion-comment-activity": { description: "The types of discussion comment activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["discussion-comment-activity-type", "discussion-comment-activity-types"] }, "discussion-comment-activity-types": { sequence: { "item-type": "discussion-comment-activity-type" } }, "discussion-comment-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "fork-string": { description: "Runs your workflow when someone forks a repository.", string: { constant: "fork" } }, fork: { description: "Runs your workflow when someone forks a repository.", null: {} }, "gollum-string": { description: "Runs your workflow when someone creates or updates a Wiki page.", string: { constant: "gollum" } }, gollum: { description: "Runs your workflow when someone creates or updates a Wiki page.", null: {} }, "image-version-string": { description: "Runs your workflow when an image version is created or changes state.", string: { constant: "image_version" } }, "image-version": { description: "Runs your workflow when an image version is created or changes state.", "one-of": ["null", "image-version-mapping"] }, "image-version-mapping": { mapping: { properties: { types: "image-version-activity", names: "event-names", versions: "event-versions" } } }, "image-version-activity": { description: "The types of image version activity that trigger the workflow. Supported activity types: `created`, `ready`, `deleted`.", "one-of": ["image-version-activity-type", "image-version-activity-types"] }, "image-version-activity-types": { sequence: { "item-type": "image-version-activity-type" } }, "image-version-activity-type": { "allowed-values": ["created", "ready", "deleted"] }, "issue-comment-string": { description: "Runs your workflow when an issue or pull request comment is created, edited, or deleted.", string: { constant: "issue_comment" } }, "issue-comment": { description: "Runs your workflow when an issue or pull request comment is created, edited, or deleted.", "one-of": ["null", "issue-comment-mapping"] }, "issue-comment-mapping": { mapping: { properties: { types: "issue-comment-activity" } } }, "issue-comment-activity": { description: "The types of issue comment activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["issue-comment-activity-type", "issue-comment-activity-types"] }, "issue-comment-activity-types": { sequence: { "item-type": "issue-comment-activity-type" } }, "issue-comment-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "issues-string": { description: "Runs your workflow when an issue in the workflow's repository is created or modified. For activity related to comments in an issue, use the `issue_comment` event.", string: { constant: "issues" } }, issues: { description: "Runs your workflow when an issue in the workflow's repository is created or modified. For activity related to comments in an issue, use the `issue_comment` event.", "one-of": ["null", "issues-mapping"] }, "issues-mapping": { mapping: { properties: { types: "issues-activity" } } }, "issues-activity": { description: "The types of issue activity that trigger the workflow. Supported activity types: `opened`, `edited`, `deleted`, `transferred`, `pinned`, `unpinned`, `closed`, `reopened`, `assigned`, `unassigned`, `labeled`, `unlabeled`, `locked`, `unlocked`, `milestoned`, `demilestoned`.", "one-of": ["issues-activity-type", "issues-activity-types"] }, "issues-activity-types": { sequence: { "item-type": "issues-activity-type" } }, "issues-activity-type": { "allowed-values": ["opened", "edited", "deleted", "transferred", "pinned", "unpinned", "closed", "reopened", "assigned", "unassigned", "labeled", "unlabeled", "locked", "unlocked", "milestoned", "demilestoned"] }, "label-string": { description: "Runs your workflow when a label in your workflow's repository is created or modified.", string: { constant: "label" } }, label: { description: "Runs your workflow when a label in your workflow's repository is created or modified.", "one-of": ["null", "label-mapping"] }, "label-mapping": { mapping: { properties: { types: "label-activity" } } }, "label-activity": { description: "The types of label activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["label-activity-type", "label-activity-types"] }, "label-activity-types": { sequence: { "item-type": "label-activity-type" } }, "label-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "merge-group-string": { description: "Runs your workflow when a pull request is added to a merge queue, which adds the pull request to a merge group.", string: { constant: "merge_group" } }, "merge-group": { description: "Runs your workflow when a pull request is added to a merge queue, which adds the pull request to a merge group.", "one-of": ["null", "merge-group-mapping"] }, "merge-group-mapping": { mapping: { properties: { types: "merge-group-activity", branches: "event-branches", "branches-ignore": "event-branches-ignore" } } }, "merge-group-activity": { description: "The types of merge group activity that trigger the workflow. Supported activity types: `checks_requested`.", "one-of": ["merge-group-activity-type", "merge-group-activity-types"] }, "merge-group-activity-types": { sequence: { "item-type": "merge-group-activity-type" } }, "merge-group-activity-type": { "allowed-values": ["checks_requested"] }, "milestone-string": { description: "Runs your workflow when a milestone in the workflow's repository is created or modified.", string: { constant: "milestone" } }, milestone: { description: "Runs your workflow when a milestone in the workflow's repository is created or modified.", "one-of": ["null", "milestone-mapping"] }, "milestone-mapping": { mapping: { properties: { types: "milestone-activity" } } }, "milestone-activity": { description: "The types of milestone activity that trigger the workflow. Supported activity types: `created`, `closed`, `opened`, `edited`, `deleted`.", "one-of": ["milestone-activity-type", "milestone-activity-types"] }, "milestone-activity-types": { sequence: { "item-type": "milestone-activity-type" } }, "milestone-activity-type": { "allowed-values": ["created", "closed", "opened", "edited", "deleted"] }, "page-build-string": { description: "Runs your workflow when someone pushes to a branch that is the publishing source for GitHub Pages, if GitHub Pages is enabled for the repository.", string: { constant: "page_build" } }, "page-build": { description: "Runs your workflow when someone pushes to a branch that is the publishing source for GitHub Pages, if GitHub Pages is enabled for the repository.", null: {} }, "project-string": { description: "Runs your workflow when a project board is created or modified. For activity related to cards or columns in a project board, use the `project_card` or `project_column` events instead.", string: { constant: "project" } }, project: { description: "Runs your workflow when a project board is created or modified. For activity related to cards or columns in a project board, use the `project_card` or `project_column` events instead.", "one-of": ["null", "project-mapping"] }, "project-mapping": { mapping: { properties: { types: "project-activity" } } }, "project-activity": { description: "The types of project activity that trigger the workflow. Supported activity types: `created`, `closed`, `reopened`, `edited`, `deleted`.", "one-of": ["project-activity-type", "project-activity-types"] }, "project-activity-types": { sequence: { "item-type": "project-activity-type" } }, "project-activity-type": { "allowed-values": ["created", "closed", "reopened", "edited", "deleted"] }, "project-card-string": { description: "Runs your workflow when a card on a project board is created or modified. For activity related to project boards or columns in a project board, use the `project` or `project_column` event instead.", string: { constant: "project_card" } }, "project-card": { description: "Runs your workflow when a card on a project board is created or modified. For activity related to project boards or columns in a project board, use the `project` or `project_column` event instead.", "one-of": ["null", "project-card-mapping"] }, "project-card-mapping": { mapping: { properties: { types: "project-card-activity" } } }, "project-card-activity": { description: "The types of project card activity that trigger the workflow. Supported activity types: `created`, `moved`, `converted`, `edited`, `deleted`.", "one-of": ["project-card-activity-type", "project-card-activity-types"] }, "project-card-activity-types": { sequence: { "item-type": "project-card-activity-type" } }, "project-card-activity-type": { "allowed-values": ["created", "moved", "converted", "edited", "deleted"] }, "project-column-string": { description: "Runs your workflow when a column on a project board is created or modified. For activity related to project boards or cards in a project board, use the `project` or `project_card` event instead.", string: { constant: "project_column" } }, "project-column": { description: "Runs your workflow when a column on a project board is created or modified. For activity related to project boards or cards in a project board, use the `project` or `project_card` event instead.", "one-of": ["null", "project-column-mapping"] }, "project-column-mapping": { mapping: { properties: { types: "project-column-activity" } } }, "project-column-activity": { description: "The types of project column activity that trigger the workflow. Supported activity types: `created`, `updated`, `moved`, `deleted`.", "one-of": ["project-column-activity-type", "project-column-activity-types"] }, "project-column-activity-types": { sequence: { "item-type": "project-column-activity-type" } }, "project-column-activity-type": { "allowed-values": ["created", "updated", "moved", "deleted"] }, "public-string": { description: "Runs your workflow when your workflow's repository changes from private to public.", string: { constant: "public" } }, public: { description: "Runs your workflow when your workflow's repository changes from private to public.", null: {} }, "pull-request-string": { description: "Runs your workflow when activity on a pull request in the workflow's repository occurs. If no activity types are specified, the workflow runs when a pull request is opened, reopened, or when the head branch of the pull request is updated.", string: { constant: "pull_request" } }, "pull-request": { description: "Runs your workflow when activity on a pull request in the workflow's repository occurs. If no activity types are specified, the workflow runs when a pull request is opened, reopened, or when the head branch of the pull request is updated.", "one-of": ["null", "pull-request-mapping"] }, "pull-request-mapping": { mapping: { properties: { types: "pull-request-activity", branches: "event-branches", "branches-ignore": "event-branches-ignore", paths: "event-paths", "paths-ignore": "event-paths-ignore" } } }, "pull-request-activity": { description: "The types of pull request activity that trigger the workflow. Supported activity types: `assigned`, `unassigned`, `labeled`, `unlabeled`, `opened`, `edited`, `closed`, `reopened`, `synchronize`, `converted_to_draft`, `locked`, `unlocked`, `enqueued`, `dequeued`, `milestoned`, `demilestoned`, `ready_for_review`, `review_requested`, `review_request_removed`, `auto_merge_enabled`, `auto_merge_disabled`.", "one-of": ["pull-request-activity-type", "pull-request-activity-types"] }, "pull-request-activity-types": { sequence: { "item-type": "pull-request-activity-type" } }, "pull-request-activity-type": { "allowed-values": ["assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "closed", "reopened", "synchronize", "converted_to_draft", "locked", "unlocked", "enqueued", "dequeued", "milestoned", "demilestoned", "ready_for_review", "review_requested", "review_request_removed", "auto_merge_enabled", "auto_merge_disabled"] }, "pull-request-comment-string": { description: "Please use the `issue_comment` event instead.", string: { constant: "pull_request_comment" } }, "pull-request-comment": { description: "Please use the `issue_comment` event instead.", "one-of": ["null", "issue-comment-mapping"] }, "pull-request-review-string": { description: "Runs your workflow when a pull request review is submitted, edited, or dismissed. A pull request review is a group of pull request review comments in addition to a body comment and a state. For activity related to pull request review comments or pull request comments, use the `pull_request_review_comment` or `issue_comment` events instead.", string: { constant: "pull_request_review" } }, "pull-request-review": { description: "Runs your workflow when a pull request review is submitted, edited, or dismissed. A pull request review is a group of pull request review comments in addition to a body comment and a state. For activity related to pull request review comments or pull request comments, use the `pull_request_review_comment` or `issue_comment` events instead.", "one-of": ["null", "pull-request-review-mapping"] }, "pull-request-review-mapping": { mapping: { properties: { types: "pull-request-review-activity" } } }, "pull-request-review-activity": { description: "The types of pull request review activity that trigger the workflow. Supported activity types: `submitted`, `edited`, `dismissed`.", "one-of": ["pull-request-review-activity-type", "pull-request-review-activity-types"] }, "pull-request-review-activity-types": { sequence: { "item-type": "pull-request-review-activity-type" } }, "pull-request-review-activity-type": { "allowed-values": ["submitted", "edited", "dismissed"] }, "pull-request-review-comment-string": { description: "", string: { constant: "pull_request_review_comment" } }, "pull-request-review-comment": { description: "", "one-of": ["null", "pull-request-review-comment-mapping"] }, "pull-request-review-comment-mapping": { mapping: { properties: { types: "pull-request-review-comment-activity" } } }, "pull-request-review-comment-activity": { description: "The types of pull request review comment activity that trigger the workflow. Supported activity types: `created`, `edited`, `deleted`.", "one-of": ["pull-request-review-comment-activity-type", "pull-request-review-comment-activity-types"] }, "pull-request-review-comment-activity-types": { sequence: { "item-type": "pull-request-review-comment-activity-type" } }, "pull-request-review-comment-activity-type": { "allowed-values": ["created", "edited", "deleted"] }, "pull-request-target-string": { description: "Runs your workflow when activity on a pull request in the workflow's repository occurs. If no activity types are specified, the workflow runs when a pull request is opened, reopened, or when the head branch of the pull request is updated.\n\nThis event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the `pull_request` event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request.", string: { constant: "pull_request_target" } }, "pull-request-target": { description: "Runs your workflow when activity on a pull request in the workflow's repository occurs. If no activity types are specified, the workflow runs when a pull request is opened, reopened, or when the head branch of the pull request is updated.\n\nThis event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the `pull_request` event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request.", "one-of": ["null", "pull-request-target-mapping"] }, "pull-request-target-mapping": { mapping: { properties: { types: "pull-request-target-activity", branches: "event-branches", "branches-ignore": "event-branches-ignore", paths: "event-paths", "paths-ignore": "event-paths-ignore" } } }, "pull-request-target-activity": { description: "The types of pull request activity that trigger the workflow. Supported activity types: `assigned`, `unassigned`, `labeled`, `unlabeled`, `opened`, `edited`, `closed`, `reopened`, `synchronize`, `converted_to_draft`, `locked`, `unlocked`, `enqueued`, `dequeued`, `milestoned`, `demilestoned`, `ready_for_review`, `review_requested`, `review_request_removed`, `auto_merge_enabled`, `auto_merge_disabled`.", "one-of": ["pull-request-target-activity-type", "pull-request-target-activity-types"] }, "pull-request-target-activity-types": { sequence: { "item-type": "pull-request-target-activity-type" } }, "pull-request-target-activity-type": { "allowed-values": ["assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "closed", "reopened", "synchronize", "converted_to_draft", "locked", "unlocked", "enqueued", "dequeued", "milestoned", "demilestoned", "ready_for_review", "review_requested", "review_request_removed", "auto_merge_enabled", "auto_merge_disabled"] }, "push-string": { description: "Runs your workflow when you push a commit or tag.", string: { constant: "push" } }, push: { description: "Runs your workflow when you push a commit or tag.", "one-of": ["null", "push-mapping"] }, "push-mapping": { mapping: { properties: { branches: "event-branches", "branches-ignore": "event-branches-ignore", tags: "event-tags", "tags-ignore": "event-tags-ignore", paths: "event-paths", "paths-ignore": "event-paths-ignore" } } }, "registry-package-string": { description: "Runs your workflow when activity related to GitHub Packages occurs in your repository.", string: { constant: "registry_package" } }, "registry-package": { description: "Runs your workflow when activity related to GitHub Packages occurs in your repository.", "one-of": ["null", "registry-package-mapping"] }, "registry-package-mapping": { mapping: { properties: { types: "registry-package-activity" } } }, "registry-package-activity": { description: "The types of registry package activity that trigger the workflow. Supported activity types: `published`, `updated`.", "one-of": ["registry-package-activity-type", "registry-package-activity-types"] }, "registry-package-activity-types": { sequence: { "item-type": "registry-package-activity-type" } }, "registry-package-activity-type": { "allowed-values": ["published", "updated"] }, "release-string": { description: "Runs your workflow when release activity in your repository occurs.", string: { constant: "release" } }, release: { description: "Runs your workflow when release activity in your repository occurs.", "one-of": ["null", "release-mapping"] }, "release-mapping": { mapping: { properties: { types: "release-activity" } } }, "release-activity": { description: "The types of release activity that trigger the workflow. Supported activity types: `published`, `unpublished`, `created`, `edited`, `deleted`, `prereleased`, `released`.", "one-of": ["release-activity-type", "release-activity-types"] }, "release-activity-types": { sequence: { "item-type": "release-activity-type" } }, "release-activity-type": { "allowed-values": ["published", "unpublished", "created", "edited", "deleted", "prereleased", "released"] }, "schedule-string": { description: "The `schedule` event allows you to trigger a workflow at a scheduled time.\n\nYou can schedule a workflow to run at specific UTC times using POSIX cron syntax. Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes. GitHub Actions does not support the non-standard syntax `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`, and `@reboot`.", string: { constant: "schedule" } }, schedule: { description: "The `schedule` event allows you to trigger a workflow at a scheduled time.\n\nYou can schedule a workflow to run at specific UTC times using POSIX cron syntax. Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes. GitHub Actions does not support the non-standard syntax `@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`, and `@reboot`.", sequence: { "item-type": "cron-mapping" } }, "status-string": { description: "Runs your workflow when the status of a Git commit changes. For example, commits can be marked as `error`, `failure`, `pending`, or `success`. If you want to provide more details about the status change, you may want to use the `check_run` event.", string: { constant: "status" } }, status: { description: "Runs your workflow when the status of a Git commit changes. For example, commits can be marked as `error`, `failure`, `pending`, or `success`. If you want to provide more details about the status change, you may want to use the `check_run` event.", null: {} }, "watch-string": { description: "Runs your workflow when the workflow's repository is starred.", string: { constant: "watch" } }, watch: { description: "Runs your workflow when the workflow's repository is starred.", "one-of": ["null", "watch-mapping"] }, "watch-mapping": { mapping: { properties: { types: "watch-activity" } } }, "watch-activity": { description: "The types of watch activity that trigger the workflow. Supported activity types: `started`.", "one-of": ["watch-activity-type", "watch-activity-types"] }, "watch-activity-types": { sequence: { "item-type": "watch-activity-type" } }, "watch-activity-type": { "allowed-values": ["started"] }, "workflow-run-string": { description: "This event occurs when a workflow run is requested or completed. It allows you to execute a workflow based on execution or completion of another workflow. The workflow started by the `workflow_run` event is able to access secrets and write tokens, even if the previous workflow was not. This is useful in cases where the previous workflow is intentionally not privileged, but you need to take a privileged action in a later workflow.", string: { constant: "workflow_run" } }, "workflow-run": { description: "This event occurs when a workflow run is requested or completed. It allows you to execute a workflow based on execution or completion of another workflow. The workflow started by the `workflow_run` event is able to access secrets and write tokens, even if the previous workflow was not. This is useful in cases where the previous workflow is intentionally not privileged, but you need to take a privileged action in a later workflow.", "one-of": ["null", "workflow-run-mapping"] }, "workflow-run-mapping": { mapping: { properties: { types: "workflow-run-activity", workflows: "workflow-run-workflows", branches: "event-branches", "branches-ignore": "event-branches-ignore" } } }, "workflow-run-workflows": { description: "The name of the workflow that triggers the `workflow_run` event. The workflow must be in the same repository as the workflow that uses the `workflow_run` event.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "workflow-run-activity": { description: "The types of workflow run activity that trigger the workflow. Supported activity types: `completed`, `requested`, `in_progress`.", "one-of": ["workflow-run-activity-type", "workflow-run-activity-types"] }, "workflow-run-activity-types": { sequence: { "item-type": "workflow-run-activity-type" } }, "workflow-run-activity-type": { "allowed-values": ["requested", "completed", "in_progress"] }, "event-branches": { description: "Use the `branches` filter when you want to include branch name patterns or when you want to both include and exclude branch name patterns. You cannot use both the `branches` and `branches-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-branches-ignore": { description: "Use the `branches-ignore` filter when you only want to exclude branch name patterns. You cannot use both the `branches` and `branches-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-names": { description: "Use the `names` filter when you want to include names via patterns or when you want to both include and exclude names using patterns. ", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-tags": { description: "Use the `tags` filter when you want to include tag name patterns or when you want to both include and exclude tag names patterns. You cannot use both the `tags` and `tags-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-tags-ignore": { description: "Use the `tags-ignore` filter when you only want to exclude tag name patterns. You cannot use both the `tags` and `tags-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-paths": { description: "Use the `paths` filter when you want to include file path patterns or when you want to both include and exclude file path patterns. You cannot use both the `paths` and `paths-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-paths-ignore": { description: "Use the `paths-ignore` filter when you only want to exclude file path patterns. You cannot use both the `paths` and `paths-ignore` filters for the same event in a workflow.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "event-versions": { description: "Use the `versions` filter when you want to include versions via patterns or when you want to both include and exclude versions using patterns. ", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "repository-dispatch-string": { description: "You can use the GitHub API to trigger a webhook event called `repository_dispatch` when you want to trigger a workflow for activity that happens outside of GitHub.", string: { constant: "branch_protection_rule" } }, "repository-dispatch": { description: "You can use the GitHub API to trigger a webhook event called `repository_dispatch` when you want to trigger a workflow for activity that happens outside of GitHub.", "one-of": ["null", "repository-dispatch-mapping"] }, "repository-dispatch-mapping": { mapping: { properties: { types: "sequence-of-non-empty-string" } } }, "workflow-call-string": { description: "The `workflow_call` event is used to indicate that a workflow can be called by another workflow. When a workflow is triggered with the `workflow_call` event, the event payload in the called workflow is the same event payload from the calling workflow.", string: { constant: "workflow_call" } }, "workflow-call": { description: "The `workflow_call` event is used to indicate that a workflow can be called by another workflow. When a workflow is triggered with the `workflow_call` event, the event payload in the called workflow is the same event payload from the calling workflow.", "one-of": ["null", "workflow-call-mapping"] }, "workflow-call-mapping": { mapping: { properties: { inputs: "workflow-call-inputs", secrets: "workflow-call-secrets", outputs: "workflow-call-outputs" } } }, "workflow-call-inputs": { description: "Inputs that are passed to the called workflow from the caller workflow.", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "workflow-call-input-definition" } }, "workflow-call-input-definition": { mapping: { properties: { description: { type: "string", description: "A string description of the input parameter." }, type: { type: "workflow-call-input-type", required: true }, required: { type: "boolean", description: "A boolean to indicate whether the action requires the input parameter. Set to `true` when the parameter is required." }, default: "workflow-call-input-default" } } }, "workflow-call-input-type": { description: "Required if input is defined for the `on.workflow_call` keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: `boolean`, `number`, or `string`.", "one-of": ["input-type-string", "input-type-boolean", "input-type-number"] }, "input-type-string": { string: { constant: "string" } }, "input-type-boolean": { string: { constant: "boolean" } }, "input-type-number": { string: { constant: "number" } }, "input-type-choice": { string: { constant: "choice" } }, "input-type-environment": { string: { constant: "environment" } }, "workflow-call-input-default": { description: 'If a `default` parameter is not set, the default value of the input is `false` for boolean, `0` for a number, and `""` for a string.', context: ["github", "inputs", "vars"], "one-of": ["string", "boolean", "number"] }, "workflow-call-secrets": { description: "A map of the secrets that can be used in the called workflow. Within the called workflow, you can use the `secrets` context to refer to a secret.", mapping: { "loose-key-type": "workflow-call-secret-name", "loose-value-type": "workflow-call-secret-definition" } }, "workflow-call-secret-name": { string: { "require-non-empty": true }, description: "A string identifier to associate with the secret." }, "workflow-call-secret-definition": { "one-of": ["null", "workflow-call-secret-mapping-definition"] }, "workflow-call-secret-mapping-definition": { mapping: { properties: { description: { type: "string", description: "A string description of the secret parameter." }, required: { type: "boolean", description: "A boolean specifying whether the secret must be supplied." } } } }, "workflow-call-outputs": { description: "A reusable workflow may generate data that you want to use in the caller workflow. To use these outputs, you must specify them as the outputs of the reusable workflow.", mapping: { "loose-key-type": "workflow-call-output-name", "loose-value-type": "workflow-call-output-definition" } }, "workflow-call-output-name": { string: { "require-non-empty": true }, description: "A string identifier to associate with the output. The value of `<output_id>` is a map of the input's metadata. The `<output_id>` must be a unique identifier within the outputs object and must start with a letter or _ and contain only alphanumeric characters, -, or _." }, "workflow-call-output-definition": { mapping: { properties: { description: { type: "string", description: "A string description of the output parameter." }, value: { type: "workflow-output-context", required: true } } } }, "workflow-output-context": { description: "The value to assign to the output parameter.", context: ["github", "inputs", "vars", "jobs"], string: {} }, "workflow-dispatch-string": { description: "The `workflow_dispatch` event allows you to manually trigger a workflow run. A workflow can be manually triggered using the GitHub API, GitHub CLI, or GitHub browser interface.", string: { constant: "workflow_dispatch" } }, "workflow-dispatch": { description: "The `workflow_dispatch` event allows you to manually trigger a workflow run. A workflow can be manually triggered using the GitHub API, GitHub CLI, or GitHub browser interface.", "one-of": ["null", "workflow-dispatch-mapping"] }, "workflow-dispatch-mapping": { mapping: { properties: { inputs: "workflow-dispatch-inputs" } } }, "workflow-dispatch-inputs": { description: "You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow. When you trigger the event, you can provide the `ref` and any `inputs`. When the workflow runs, you can access the input values in the `inputs` context.", mapping: { "loose-key-type": "workflow-dispatch-input-name", "loose-value-type": "workflow-dispatch-input" } }, "workflow-dispatch-input-name": { string: { "require-non-empty": true }, description: "A string identifier to associate with the input. The value of <input_id> is a map of the input's metadata. The <input_id> must be a unique identifier within the inputs object. The <input_id> must start with a letter or _ and contain only alphanumeric characters, -, or _." }, "workflow-dispatch-input": { mapping: { properties: { description: { type: "string", description: "A string description of the input parameter." }, type: { type: "workflow-dispatch-input-type" }, required: { type: "boolean", description: "A boolean to indicate whether the workflow requires the input parameter. Set to true when the parameter is required." }, default: "workflow-dispatch-input-default", options: { type: "sequence-of-string", description: "The options of the dropdown list, if the type is a choice." } } } }, "workflow-dispatch-input-type": { description: "A string representing the type of the input. This must be one of: `boolean`, `number`, `string`, `choice`, or `environment`.", "one-of": ["input-type-string", "input-type-boolean", "input-type-number", "input-type-environment", "input-type-choice"] }, "workflow-dispatch-input-default": { description: "The default value is used when an input parameter isn't specified in a workflow file.", "one-of": ["string", "boolean", "number"] }, permissions: { description: "You can use `permissions` to modify the default permissions granted to the `GITHUB_TOKEN`, adding or removing access as required, so that you only allow the minimum required access.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#permissions)", "one-of": ["permissions-mapping", "permission-level-shorthand-read-all", "permission-level-shorthand-write-all"] }, "permissions-mapping": { mapping: { properties: { actions: { type: "permission-level-any", description: "Actions workflows, workflow runs, and artifacts." }, "artifact-metadata": { type: "permission-level-any", description: "Storage and deployment records for build artifacts." }, attestations: { type: "permission-level-any", description: "Artifact attestations." }, checks: { type: "permission-level-any", description: "Check runs and check suites." }, contents: { type: "permission-level-any", description: "Repository contents, commits, branches, downloads, releases, and merges." }, deployments: { type: "permission-level-any", description: "Deployments and deployment statuses." }, discussions: { type: "permission-level-any", description: "Discussions and related comments and labels." }, "id-token": { type: "permission-level-write-or-no-access", description: "Token to request an OpenID Connect token." }, issues: { type: "permission-level-any", description: "Issues and related comments, assignees, labels, and milestones." }, models: { type: "permission-level-read-or-no-access", description: "Call AI models with GitHub Models." }, packages: { type: "permission-level-any", description: "Packages published to the GitHub Package Platform." }, pages: { type: "permission-level-any", description: "Retrieve Pages statuses, configuration, and builds, as well as create new builds." }, "pull-requests": { type: "permission-level-any", description: "Pull requests and related comments, assignees, labels, milestones, and merges." }, "repository-projects": { type: "permission-level-any", description: "Classic projects within a repository." }, "security-events": { type: "permission-level-any", description: "Code scanning and Dependabot alerts." }, statuses: { type: "permission-level-any", description: "Commit statuses." } } } }, "permission-level-any": { description: "The permission level for the `GITHUB_TOKEN`.", "one-of": ["permission-level-read", "permission-level-write", "permission-level-no-access"] }, "permission-level-read-or-no-access": { "one-of": ["permission-level-read", "permission-level-no-access"] }, "permission-level-write-or-no-access": { "one-of": ["permission-level-write", "permission-level-no-access"] }, "permission-level-read": { description: "The permission level for the `GITHUB_TOKEN`. Grants `read` permission for the specified scope.", string: { constant: "read" } }, "permission-level-write": { description: "The permission level for the `GITHUB_TOKEN`. Grants `write` permission for the specified scope.", string: { constant: "write" } }, "permission-level-no-access": { description: "The permission level for the `GITHUB_TOKEN`. Restricts all access for the specified scope.", string: { constant: "none" } }, "permission-level-shorthand-read-all": { description: "The permission level for the `GITHUB_TOKEN`. Grants `read` access for all scopes.", string: { constant: "read-all" } }, "permission-level-shorthand-write-all": { description: "The permission level for the `GITHUB_TOKEN`. Grants `write` access for all scopes.", string: { constant: "write-all" } }, "workflow-defaults": { description: "Use `defaults` to create a map of default settings that will apply to all jobs in the workflow. You can also set default settings that are only available to a job.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#defaults)", mapping: { properties: { run: "workflow-defaults-run" } } }, "workflow-defaults-run": { mapping: { properties: { shell: "shell", "working-directory": "working-directory" } } }, "workflow-env": { description: "A map of environment variables that are available to the steps of all jobs in the workflow. You can also set environment variables that are only available to the steps of a single job or to a single step.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#env)", context: ["github", "inputs", "vars", "secrets"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, jobs: { description: "A workflow run is made up of one or more `jobs`, which run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the `jobs.<job_id>.needs` keyword. Each job runs in a runner environment specified by `runs-on`.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobs)", mapping: { "loose-key-type": "job-id", "loose-value-type": "job" } }, "job-id": { string: { "require-non-empty": true }, description: "A unique identifier for the job. The identifier must start with a letter or _ and contain only alphanumeric characters, -, or _." }, job: { description: "Each job must have an id to associate with the job. The key `job_id` is a string and its value is a map of the job's configuration data. You must replace `<job_id>` with a string that is unique to the jobs object. The `<job_id>` must start with a letter or _ and contain only alphanumeric characters, -, or _.", "one-of": ["job-factory", "workflow-job"] }, "job-factory": { mapping: { properties: { needs: "needs", if: "job-if", strategy: "strategy", name: { type: "string-strategy-context", description: "The name of the job displayed on GitHub." }, "runs-on": { type: "runs-on", required: true }, "timeout-minutes": { type: "number-strategy-context", description: "The maximum number of minutes to let a workflow run before GitHub automatically cancels it. Default: 360" }, "cancel-timeout-minutes": "number-strategy-context", "continue-on-error": { type: "boolean-strategy-context", description: "Prevents a workflow run from failing when a job fails. Set to true to allow a workflow run to pass when this job fails." }, container: "container", services: "services", env: "job-env", environment: "job-environment", permissions: "permissions", concurrency: "job-concurrency", outputs: "job-outputs", defaults: "job-defaults", steps: "steps", snapshot: "snapshot" } } }, "workflow-job": { mapping: { properties: { name: { type: "string-strategy-context", description: "The name of the job displayed on GitHub." }, uses: { description: "The location and version of a reusable workflow file to run as a job. Use one of the following formats:\n\n* `{owner}/{repo}/.github/workflows/{filename}@{ref}` for reusable workflows in public and private repositories.\n* `./.github/workflows/{filename}` for reusable workflows in the same repository.\n\n{ref} can be a SHA, a release tag, or a branch name. Using the commit SHA is the safest for stability and security.", type: "non-empty-string", required: true }, with: "workflow-job-with", secrets: "workflow-job-secrets", needs: "needs", if: "job-if", permissions: "permissions", concurrency: "job-concurrency", strategy: "strategy" } } }, "workflow-job-with": { description: "When a job is used to call a reusable workflow, you can use `with` to provide a map of inputs that are passed to the called workflow.\n\nAny inputs that you pass must match the input specifications defined in the called workflow.", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "scalar-needs-context" } }, "workflow-job-secrets": { description: "When a job is used to call a reusable workflow, you can use `secrets` to provide a map of secrets that are passed to the called workflow.\n\nAny secrets that you pass must match the names defined in the called workflow.", "one-of": ["workflow-job-secrets-mapping", "workflow-job-secrets-inherit"] }, "workflow-job-secrets-mapping": { mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "scalar-needs-context-with-secrets" } }, "workflow-job-secrets-inherit": { string: { constant: "inherit" } }, needs: { description: "Use `needs` to identify any jobs that must complete successfully before this job will run. It can be a string or array of strings. If a job fails, all jobs that need it are skipped unless the jobs use a conditional expression that causes the job to continue. If a run contains a series of jobs that need each other, a failure applies to all jobs in the dependency chain from the point of failure onwards.", "one-of": ["sequence-of-non-empty-string", "non-empty-string"] }, "job-if": { description: "You can use the `if` conditional to prevent a job from running unless a condition is met. You can use any supported context and expression to create a conditional.", context: ["github", "inputs", "vars", "needs", "always(0,0)", "failure(0,MAX)", "cancelled(0,0)", "success(0,MAX)"], string: {} }, "job-if-result": { context: ["github", "inputs", "vars", "needs", "always(0,0)", "failure(0,MAX)", "cancelled(0,0)", "success(0,MAX)"], "one-of": ["null", "boolean", "number", "string", "sequence", "mapping"] }, strategy: { description: "Use `strategy` to use a matrix strategy for your jobs. A matrix strategy lets you use variables in a single job definition to automatically create multiple job runs that are based on the combinations of the variables. ", context: ["github", "inputs", "vars", "needs"], mapping: { properties: { "fail-fast": { type: "boolean", description: "Setting `fail-fast` to `false` prevents GitHub from canceling all in-progress jobs if any matrix job fails. Default: `true`" }, "max-parallel": { type: "number", description: "The maximum number of jobs that can run simultaneously when using a matrix job strategy. By default, GitHub will maximize the number of jobs run in parallel depending on runner availability." }, matrix: "matrix" } } }, matrix: { description: "Use `matrix` to define a matrix of different job configurations. Within your matrix, define one or more variables followed by an array of values.", mapping: { properties: { include: { type: "matrix-filter", description: "Use `include` to expand existing matrix configurations or to add new configurations. The value of `include` is a list of objects.\n\nFor each object in the `include` list, the key:value pairs in the object will be added to each of the matrix combinations if none of the key:value pairs overwrite any of the original matrix values. If the object cannot be added to any of the matrix combinations, a new matrix combination will be created instead. Note that the original matrix values will not be overwritten, but added matrix values can be overwritten." }, exclude: { type: "matrix-filter", description: "To remove specific configurations defined in the matrix, use `exclude`. An excluded configuration only has to be a partial match for it to be excluded." } }, "loose-key-type": "non-empty-string", "loose-value-type": "sequence" } }, "matrix-filter": { sequence: { "item-type": "matrix-filter-item" } }, "matrix-filter-item": { mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, snapshot: { description: "Use `snapshot` to define a custom image you want to create or update after your job succeeds by taking a snapshot of your runner.", "one-of": ["non-empty-string", "snapshot-mapping"] }, "snapshot-mapping": { mapping: { properties: { "image-name": { description: "The desired name of the custom image you want to create or update.", type: "non-empty-string", required: true }, if: "snapshot-if", version: { description: "The desired major version updates upon a new custom image version creation.", type: "non-empty-string" } } } }, "snapshot-if": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], description: "Use the if conditional to prevent a snapshot from being taken unless a condition is met. Any supported context and expression can be used to create a conditional. Expressions in an `if` conditional do not require the bracketed expression syntax. When you use expressions in an `if` conditional, you may omit the expression syntax because GitHub automatically evaluates the `if` conditional as an expression.", string: {} }, "runs-on": { description: "Use `runs-on` to define the type of machine to run the job on.\n* The destination machine can be either a GitHub-hosted runner, larger runner, or a self-hosted runner.\n* You can target runners based on the labels assigned to them, or their group membership, or a combination of these.\n* You can provide `runs-on` as a single string or as an array of strings.\n* If you specify an array of strings, your workflow will execute on any runner that matches all of the specified `runs-on` values.\n* If you would like to run your workflow on multiple machines, use `jobs.<job_id>.strategy`.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["non-empty-string", "sequence-of-non-empty-string", "runs-on-mapping"] }, "runs-on-mapping": { mapping: { properties: { group: { description: "The group from which to select a runner.", type: "non-empty-string" }, labels: "runs-on-labels" } } }, "runs-on-labels": { description: "The label by which to filter for available runners.", "one-of": ["non-empty-string", "sequence-of-non-empty-string"] }, "job-env": { description: "A map of variables that are available to all steps in the job.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, "workflow-concurrency": { description: "Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression.\n\nYou can also specify `concurrency` at the job level.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)", context: ["github", "inputs", "vars"], "one-of": ["string", "concurrency-mapping"] }, "job-concurrency": { description: "Concurrency ensures that only a single job using the same concurrency group will run at a time. A concurrency group can be any string or expression. The expression can use any context except for the `secrets` context.\n\nYou can also specify `concurrency` at the workflow level.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["non-empty-string", "concurrency-mapping"] }, "concurrency-mapping": { description: "Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression.\n\nYou can also specify `concurrency` at the job level.\n\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)", mapping: { properties: { group: { type: "non-empty-string", required: true, description: "When a concurrent job or workflow is queued, if another job or workflow using the same concurrency group in the repository is in progress, the queued job or workflow will be `pending`. Any previously pending job or workflow in the concurrency group will be canceled. To also cancel any currently running job or workflow in the same concurrency group, specify `cancel-in-progress: true`." }, "cancel-in-progress": { type: "boolean", description: "To cancel any currently running job or workflow in the same concurrency group, specify cancel-in-progress: true." } } } }, "job-environment": { description: "The environment that the job references. All environment protection rules must pass before a job referencing the environment is sent to a runner.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["string", "job-environment-mapping"] }, "job-environment-mapping": { mapping: { properties: { name: { type: "job-environment-name", required: true }, url: { type: "string-runner-context-no-secrets", description: "The environment URL, which maps to `environment_url` in the deployments API." } } } }, "job-environment-name": { description: "The name of the environment used by the job.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], string: {} }, "job-defaults": { description: "A map of default settings that will apply to all steps in the job. You can also set default settings for the entire workflow.", mapping: { properties: { run: "job-defaults-run" } } }, "job-defaults-run": { context: ["github", "inputs", "vars", "strategy", "matrix", "needs", "env"], mapping: { properties: { shell: "shell", "working-directory": "working-directory" } } }, "job-outputs": { description: "A map of outputs for a called workflow. Called workflow outputs are available to all downstream jobs in the caller workflow. Each output has an identifier, an optional `description,` and a `value`. The `value` must be set to the value of an output from a job within the called workflow.", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string-runner-context" } }, steps: { description: "A job contains a sequence of tasks called `steps`. Steps can run commands, run setup tasks, or run an action in your repository, a public repository, or an action published in a Docker registry. Not all steps run actions, but all actions run as a step. Each step runs in its own process in the runner environment and has access to the workspace and filesystem. Because steps run in their own process, changes to environment variables are not preserved between steps. GitHub provides built-in steps to set up and complete a job. Must contain either `uses` or `run`.", sequence: { "item-type": "steps-item" } }, "steps-item": { "one-of": ["run-step", "regular-step"] }, "run-step": { mapping: { properties: { name: "step-name", id: "step-id", if: "step-if", "timeout-minutes": "step-timeout-minutes", run: { type: "string-steps-context", description: "Runs command-line programs using the operating system's shell. If you do not provide a `name`, the step name will default to the text specified in the `run` command. Commands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. Each `run` keyword represents a new process and shell in the virtual environment. When you provide multi-line commands, each line runs in the same shell.", required: true }, "continue-on-error": "step-continue-on-error", env: "step-env", "working-directory": "string-steps-context", shell: "shell" } } }, "regular-step": { mapping: { properties: { name: "step-name", id: "step-id", if: "step-if", "continue-on-error": "step-continue-on-error", "timeout-minutes": "step-timeout-minutes", uses: { type: "step-uses", required: true }, with: "step-with", env: "step-env" } } }, "step-uses": { description: "Selects an action to run as part of a step in your job. An action is a reusable unit of code. You can use an action defined in the same repository as the workflow, a public repository, or in a published Docker container image.", string: { "require-non-empty": true } }, "step-continue-on-error": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], boolean: {}, description: "Prevents a job from failing when a step fails. Set to `true` to allow a job to pass when this step fails." }, "step-id": { string: { "require-non-empty": true }, description: "A unique identifier for the step. You can use the `id` to reference the step in contexts." }, "step-if": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "steps", "job", "runner", "env", "always(0,0)", "failure(0,0)", "cancelled(0,0)", "success(0,0)", "hashFiles(1,255)"], description: "Use the `if` conditional to prevent a step from running unless a condition is met. Any supported context and expression can be used to create a conditional. Expressions in an `if` conditional do not require the bracketed expression syntax. When you use expressions in an `if` conditional, you may omit the expression syntax because GitHub automatically evaluates the `if` conditional as an expression.", string: {} }, "step-if-result": { context: ["github", "inputs", "vars", "strategy", "matrix", "steps", "job", "runner", "env", "always(0,0)", "failure(0,0)", "cancelled(0,0)", "success(0,0)", "hashFiles(1,255)"], "one-of": ["null", "boolean", "number", "string", "sequence", "mapping"] }, "step-env": { description: "Sets variables for steps to use in the runner environment. You can also set variables for the entire workflow or a job.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, "step-name": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], string: {}, description: "A name for your step to display on GitHub." }, "step-timeout-minutes": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], number: {}, description: "The maximum number of minutes to run the step before killing the process." }, "step-with": { description: "A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as variables. When you specify an input in a workflow file or use a default input value, GitHub creates a variable for the input with the name `INPUT_<VARIABLE_NAME>`. The variable created converts input names to uppercase letters and replaces spaces with `_`.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, container: { description: "A container to run any steps in a job that don't already specify a container. If you have steps that use both script and container actions, the container actions will run as sibling containers on the same network with the same volume mounts.\n\nIf you do not set a container, all steps will run directly on the host specified by runs-on unless a step refers to an action configured to run in a container.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["string", "container-mapping"] }, "container-mapping": { mapping: { properties: { image: { type: "non-empty-string", description: "Use `jobs.<job_id>.container.image` to define the Docker image to use as the container to run the action. The value can be the Docker Hub image or a registry name." }, options: { type: "string", description: "Use `jobs.<job_id>.container.options` to configure additional Docker container resource options." }, env: "container-env", ports: { type: "sequence-of-non-empty-string", description: "Use `jobs.<job_id>.container.ports` to set an array of ports to expose on the container." }, volumes: { type: "sequence-of-non-empty-string", description: "Use `jobs.<job_id>.container.volumes` to set an array of volumes for the container to use. You can use volumes to share data between services or other steps in a job. You can specify named Docker volumes, anonymous Docker volumes, or bind mounts on the host." }, credentials: "container-registry-credentials" } } }, services: { description: "Additional containers to host services for a job in a workflow. These are useful for creating databases or cache services like redis. The runner on the virtual machine will automatically create a network and manage the life cycle of the service containers. When you use a service container for a job or your step uses container actions, you don't need to set port information to access the service. Docker automatically exposes all ports between containers on the same network. When both the job and the action run in a container, you can directly reference the container by its hostname. The hostname is automatically mapped to the service name. When a step does not use a container action, you must access the service using localhost and bind the ports.", context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "services-container" } }, "services-container": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["non-empty-string", "container-mapping"] }, "container-registry-credentials": { description: "If the image's container registry requires authentication to pull the image, you can use `jobs.<job_id>.container.credentials` to set a map of the username and password. The credentials are the same values that you would provide to the `docker login` command.", context: ["github", "inputs", "vars", "secrets", "env"], mapping: { properties: { username: "non-empty-string", password: "non-empty-string" } } }, "container-env": { description: "Use `jobs.<job_id>.container.env` to set a map of variables in the container.", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string-runner-context" } }, "non-empty-string": { string: { "require-non-empty": true } }, "sequence-of-non-empty-string": { sequence: { "item-type": "non-empty-string" } }, "sequence-of-string": { sequence: { "item-type": "string" } }, "boolean-needs-context": { context: ["github", "inputs", "vars", "needs"], boolean: {} }, "number-needs-context": { context: ["github", "inputs", "vars", "needs"], number: {} }, "string-needs-context": { context: ["github", "inputs", "vars", "needs"], string: {} }, "scalar-needs-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], "one-of": ["string", "boolean", "number"] }, "scalar-needs-context-with-secrets": { context: ["github", "inputs", "vars", "needs", "secrets", "strategy", "matrix"], "one-of": ["string", "boolean", "number"] }, "boolean-strategy-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], boolean: {} }, "number-strategy-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], number: {} }, "string-strategy-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix"], string: {} }, "boolean-steps-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], boolean: {} }, "number-steps-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], number: {} }, "string-runner-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env"], string: {} }, "string-runner-context-no-secrets": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "steps", "job", "runner", "env"], string: {} }, "string-steps-context": { context: ["github", "inputs", "vars", "needs", "strategy", "matrix", "secrets", "steps", "job", "runner", "env", "hashFiles(1,255)"], string: {} }, shell: { string: { "require-non-empty": true }, description: "Use `shell` to override the default shell settings in the runner's operating system. You can use built-in shell keywords, or you can define a custom set of shell options. The shell command that is run internally executes a temporary file that contains the commands specified in `run`." }, "working-directory": { string: { "require-non-empty": true }, description: "The `working-directory` keyword specifies the working directory where the command is run." }, "cron-mapping": { mapping: { properties: { cron: "cron-pattern" } } }, "cron-pattern": { string: { "require-non-empty": true } } } };
|
|
21479
21478
|
|
|
21480
21479
|
// ../workflow-parser/dist/workflows/workflow-schema.js
|
|
21481
21480
|
var schema;
|
|
@@ -23163,7 +23162,7 @@ function getOptionsWithDefaults(options) {
|
|
|
23163
23162
|
}
|
|
23164
23163
|
|
|
23165
23164
|
// ../workflow-parser/dist/action-v1.0.min.json
|
|
23166
|
-
var action_v1_0_min_default = { definitions: { "action-root": { description: "Action file", mapping: { properties: { name: "string", description: "string", inputs: "inputs", outputs: "outputs", runs: "runs" }, "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, "action-root-strict": { description: "GitHub Action manifest file (action.yml/action.yaml) that defines an action's metadata, inputs, outputs, and execution configuration.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions)", mapping: { properties: { name: { type: "non-empty-string", required: true, description: "The name of your action. GitHub displays the name in the Actions tab to help visually identify actions in each job.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#name)" }, description: { type: "string", required: true, description: "A short description of the action. GitHub displays this description in the Actions Marketplace.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#description)" }, author: { type: "string", description: "The name of the action's author.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#author)" }, inputs: "inputs-strict", outputs: "outputs", runs: { type: "runs-strict", required: true }, branding: "branding" } } }, inputs: { mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "input" } }, "inputs-strict": { description: "Input parameters allow you to specify data that the action expects to use during runtime. GitHub stores input parameters as environment variables. Inputs ids with uppercase letters are converted to lowercase during runtime.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputs)", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "input-strict" } }, input: { mapping: { properties: { default: "input-default-context" }, "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, "input-strict": { description: "An input parameter for this action.", mapping: { properties: { description: { type: "string", description: "A string description of the input parameter.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddescription)" }, required: { type: "boolean", description: "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_idrequired)" }, default: { type: "input-default-context", description: "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddefault)" }, deprecationMessage: { type: "string", description: "A string shown to users using the deprecated input, warning them that the input is deprecated and mentioning any alternatives.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddeprecationmessage)" } }, "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, "input-default-context": { description: "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddefault)", context: ["github", "strategy", "matrix", "job", "runner", "hashFiles(1,255)"], string: {} }, outputs: { description: "Output parameters allow you to declare data that an action sets. Actions that run later in a workflow can use the output data set in previously run actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions)", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "output-definition" } }, "output-definition": { description: "An output parameter for this action.", mapping: { properties: { description: { type: "string", description: "A string description of the output parameter.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_iddescription)" }, value: { type: "output-value", description: "The value that the output parameter will be mapped to. You can set this to a string or an expression with context.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_idvalue)" } } } }, "output-value": { description: "The value that the output parameter will be mapped to. You can set this to a string or an expression with context.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_idvalue)", context: ["github", "strategy", "matrix", "steps", "inputs", "job", "runner", "env"], string: {} }, runs: { "one-of": ["container-runs", "node-runs", "composite-runs", "plugin-runs"] }, "runs-strict": { description: "Specifies whether this is a JavaScript action, a composite action, or a Docker container action and how the action is executed.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runs)", "one-of": ["container-runs-strict", "node-runs-strict", "composite-runs-strict"] }, "plugin-runs": { mapping: { properties: { plugin: "non-empty-string" } } }, "container-runs": { mapping: { properties: { using: "non-empty-string", image: "non-empty-string", entrypoint: "non-empty-string", args: "container-runs-args", env: "container-runs-env", "pre-entrypoint": "non-empty-string", "pre-if": "non-empty-string", "post-entrypoint": "non-empty-string", "post-if": "non-empty-string" } } }, "container-runs-args": { description: "An array of strings that define the inputs for a Docker container. Inputs can include hardcoded strings. GitHub passes the args to the container's ENTRYPOINT when the container starts up.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsargs)", sequence: { "item-type": "container-runs-context" } }, "container-runs-env": { description: "Specifies a key/value map of environment variables to set in the container environment.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsenv)", context: ["inputs"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, "container-runs-context": { context: ["inputs"], string: {} }, "node-runs": { mapping: { properties: { using: "non-empty-string", main: "non-empty-string", pre: "non-empty-string", "pre-if": "non-empty-string", post: "non-empty-string", "post-if": "non-empty-string" } } }, "composite-runs": { mapping: { properties: { using: "non-empty-string", steps: "composite-steps" } } }, "container-runs-strict": { description: "Configuration for Docker container actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runs)", mapping: { properties: { using: { type: "using", required: true, description: "The runtime used to execute the action. Must be docker for Docker container actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsusing)" }, image: { type: "non-empty-string", required: true, description: "The Docker image to use as the container to run the action. The value can be the Docker base image name, a local Dockerfile in your repository, or a public image in Docker Hub or another registry.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsimage)" }, entrypoint: { type: "non-empty-string", description: "Overrides the Docker ENTRYPOINT in the Dockerfile, or sets it if one wasn't already specified.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsentrypoint)" }, args: "container-runs-args", env: "container-runs-env", "pre-entrypoint": { type: "non-empty-string", description: "Allows you to run a script before the entrypoint action begins.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspre-entrypoint)" }, "pre-if": { type: "non-empty-string", description: "Allows you to define conditions for the pre: action execution. The pre: action will only run if the conditions in pre-if are met. If not set, then pre-if defaults to always().\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspre-if)" }, "post-entrypoint": { type: "non-empty-string", description: "Allows you to run a cleanup script once the runs.entrypoint action has completed.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspost-entrypoint)" }, "post-if": { type: "non-empty-string", description: "Allows you to define conditions for the post: action execution. The post: action will only run if the conditions in post-if are met. If not set, then post-if defaults to always().\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspost-if)" } } } }, "node-runs-strict": { description: "Configuration for JavaScript actions executed with Node.js.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runs)", mapping: { properties: { using: { type: "using", required: true, description: "The runtime used to execute the action. Use node20 or node24 for JavaScript actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsusing)" }, main: { type: "non-empty-string", required: true, description: "The file that contains your action code. The runtime specified in using executes this file.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsmain)" }, pre: { type: "non-empty-string", description: "Allows you to run a script at the start of a job, before the main: action begins. You can use pre: to run prerequisite setup scripts.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspre)" }, "pre-if": { type: "non-empty-string", description: "Allows you to define conditions for the pre: action execution. The pre: action will only run if the conditions in pre-if are met. If not set, then pre-if defaults to always().\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspre-if)" }, post: { type: "non-empty-string", description: "Allows you to run a script at the end of a job, once the main: action has completed. You can use post: to run cleanup scripts.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspost)" }, "post-if": { type: "non-empty-string", description: "Allows you to define conditions for the post: action execution. The post: action will only run if the conditions in post-if are met. If not set, then post-if defaults to always().\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspost-if)" } } } }, "composite-runs-strict": { description: "Configuration for composite actions that run multiple steps.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runs)", mapping: { properties: { using: { type: "using", required: true, description: "The runtime used to execute the action. Must be composite for composite actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsusing)" }, steps: { type: "composite-steps", required: true } } } }, "composite-steps": { description: "The steps that you plan to run in this action. These can be either run steps or uses steps.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runssteps)", sequence: { "item-type": "composite-step" } }, "composite-step": { description: "A step within a composite action.", "one-of": ["run-step", "uses-step"] }, "run-step": { description: "Runs a command-line program using the operating system's shell.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsrun)", mapping: { properties: { name: { type: "string-steps-context", description: "A name for your step to display on GitHub.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsname)" }, id: { type: "non-empty-string", description: "A unique identifier for the step. You can use the id to reference the step in contexts.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsid)" }, if: { type: "step-if", description: "You can use the if conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsif)" }, run: { type: "string-steps-context", required: true, description: "The command you want to run. This can be inline or a script in your action repository.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsrun)" }, shell: { type: "string-steps-context", required: true, description: "The shell where you want to run the command. Any shell supported by the runner can be used. Required if run is set.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsshell)" }, env: "step-env", "continue-on-error": { type: "boolean-steps-context", description: "Prevents the action from failing when a step fails. Set to true to allow the action to pass when this step fails.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepscontinue-on-error)" }, "working-directory": { type: "string-steps-context", description: "Specifies the working directory where the command is run.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsworking-directory)" } } } }, "uses-step": { description: "Runs another action as part of a step in your action.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsuses)", mapping: { properties: { name: { type: "string-steps-context", description: "A name for your step to display on GitHub.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsname)" }, id: { type: "non-empty-string", description: "A unique identifier for the step. You can use the id to reference the step in contexts.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsid)" }, if: { type: "step-if", description: "You can use the if conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsif)" }, uses: { type: "non-empty-string", required: true, description: "Selects an action to run as part of a step in your action. An action is a reusable unit of code.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsuses)" }, with: "step-with", env: "step-env", "continue-on-error": { type: "boolean-steps-context", description: "Prevents the action from failing when a step fails. Set to true to allow the action to pass when this step fails.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepscontinue-on-error)" } } } }, "string-steps-context": { context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "hashFiles(1,255)"], string: {} }, "boolean-steps-context": { context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "hashFiles(1,255)"], boolean: {} }, "step-env": { description: "Sets variables for steps to use in the runner environment. You can also set variables for the entire action.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsenv)", context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "hashFiles(1,255)"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, "step-if": { description: "You can use the if conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsif)", context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "always(0,0)", "failure(0,0)", "cancelled(0,0)", "success(0,0)", "hashFiles(1,255)"], string: {} }, "step-with": { description: "A map of the input parameters defined by the action. Each input parameter is a key/value pair.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)", context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "hashFiles(1,255)"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, branding: { description: "You can use a color and Feather icon to create a badge to personalize and distinguish your action in GitHub Marketplace.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#branding)", mapping: { properties: { icon: { type: "branding-icon", description: "The name of the v4.28.0 Feather icon to use.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#brandingicon)" }, color: { type: "branding-color", description: "The background color of the badge.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#brandingcolor)" } } } }, "branding-icon": { description: "The name of the v4.28.0 Feather icon to use. Brand icons are omitted as well as: coffee, columns, divide-circle, divide-square, divide, frown, hexagon, key, meh, mouse-pointer, smile, tool, x-octagon.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#brandingicon)", "allowed-values": ["activity", "airplay", "alert-circle", "alert-octagon", "alert-triangle", "align-center", "align-justify", "align-left", "align-right", "anchor", "aperture", "archive", "arrow-down-circle", "arrow-down-left", "arrow-down-right", "arrow-down", "arrow-left-circle", "arrow-left", "arrow-right-circle", "arrow-right", "arrow-up-circle", "arrow-up-left", "arrow-up-right", "arrow-up", "at-sign", "award", "bar-chart-2", "bar-chart", "battery-charging", "battery", "bell-off", "bell", "bluetooth", "bold", "book-open", "book", "bookmark", "box", "briefcase", "calendar", "camera-off", "camera", "cast", "check-circle", "check-square", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevrons-down", "chevrons-left", "chevrons-right", "chevrons-up", "circle", "clipboard", "clock", "cloud-drizzle", "cloud-lightning", "cloud-off", "cloud-rain", "cloud-snow", "cloud", "code", "command", "compass", "copy", "corner-down-left", "corner-down-right", "corner-left-down", "corner-left-up", "corner-right-down", "corner-right-up", "corner-up-left", "corner-up-right", "cpu", "credit-card", "crop", "crosshair", "database", "delete", "disc", "dollar-sign", "download-cloud", "download", "droplet", "edit-2", "edit-3", "edit", "external-link", "eye-off", "eye", "fast-forward", "feather", "file-minus", "file-plus", "file-text", "file", "film", "filter", "flag", "folder-minus", "folder-plus", "folder", "gift", "git-branch", "git-commit", "git-merge", "git-pull-request", "globe", "grid", "hard-drive", "hash", "headphones", "heart", "help-circle", "home", "image", "inbox", "info", "italic", "layers", "layout", "life-buoy", "link-2", "link", "list", "loader", "lock", "log-in", "log-out", "mail", "map-pin", "map", "maximize-2", "maximize", "menu", "message-circle", "message-square", "mic-off", "mic", "minimize-2", "minimize", "minus-circle", "minus-square", "minus", "monitor", "moon", "more-horizontal", "more-vertical", "move", "music", "navigation-2", "navigation", "octagon", "package", "paperclip", "pause-circle", "pause", "percent", "phone-call", "phone-forwarded", "phone-incoming", "phone-missed", "phone-off", "phone-outgoing", "phone", "pie-chart", "play-circle", "play", "plus-circle", "plus-square", "plus", "pocket", "power", "printer", "radio", "refresh-ccw", "refresh-cw", "repeat", "rewind", "rotate-ccw", "rotate-cw", "rss", "save", "scissors", "search", "send", "server", "settings", "share-2", "share", "shield-off", "shield", "shopping-bag", "shopping-cart", "shuffle", "sidebar", "skip-back", "skip-forward", "slash", "sliders", "smartphone", "speaker", "square", "star", "stop-circle", "sun", "sunrise", "sunset", "tablet", "tag", "target", "terminal", "thermometer", "thumbs-down", "thumbs-up", "toggle-left", "toggle-right", "trash-2", "trash", "trending-down", "trending-up", "triangle", "truck", "tv", "type", "umbrella", "underline", "unlock", "upload-cloud", "upload", "user-check", "user-minus", "user-plus", "user-x", "user", "users", "video-off", "video", "voicemail", "volume-1", "volume-2", "volume-x", "volume", "watch", "wifi-off", "wifi", "wind", "x-circle", "x-square", "x", "zap-off", "zap", "zoom-in", "zoom-out"] }, "branding-color": { description: "The background color of the badge.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#brandingcolor)", "allowed-values": ["white", "yellow", "blue", "green", "orange", "red", "purple", "gray-dark"] }, using: { description: "The runtime used to execute the action.", "allowed-values": ["docker", "node12", "node16", "node20", "node24", "composite"] }, "non-empty-string": { string: { "require-non-empty": true } } } };
|
|
23165
|
+
var action_v1_0_min_default = { definitions: { "action-root": { description: "Action file", mapping: { properties: { name: "string", description: "string", inputs: "inputs", outputs: "outputs", runs: "runs" }, "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, "action-root-strict": { description: "GitHub Action manifest file (action.yml/action.yaml) that defines an action's metadata, inputs, outputs, and execution configuration.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions)", mapping: { properties: { name: { type: "non-empty-string", required: true, description: "The name of your action. GitHub displays the name in the Actions tab to help visually identify actions in each job.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#name)" }, description: { type: "string", required: true, description: "A short description of the action. GitHub displays this description in the Actions Marketplace.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#description)" }, author: { type: "string", description: "The name of the action's author.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#author)" }, inputs: "inputs-strict", outputs: "outputs", runs: { type: "runs-strict", required: true }, branding: "branding" } } }, inputs: { mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "input" } }, "inputs-strict": { description: "Input parameters allow you to specify data that the action expects to use during runtime. GitHub stores input parameters as environment variables. Inputs ids with uppercase letters are converted to lowercase during runtime.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputs)", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "input-strict" } }, input: { mapping: { properties: { default: "input-default-context" }, "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, "input-strict": { description: "An input parameter for this action.", mapping: { properties: { description: { type: "string", description: "A string description of the input parameter.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddescription)" }, required: { type: "boolean", description: "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_idrequired)" }, default: { type: "input-default-context", description: "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddefault)" }, deprecationMessage: { type: "string", description: "A string shown to users using the deprecated input, warning them that the input is deprecated and mentioning any alternatives.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddeprecationmessage)" } }, "loose-key-type": "non-empty-string", "loose-value-type": "any" } }, "input-default-context": { description: "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddefault)", context: ["github", "strategy", "matrix", "job", "runner", "hashFiles(1,255)"], string: {} }, outputs: { description: "Output parameters allow you to declare data that an action sets. Actions that run later in a workflow can use the output data set in previously run actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions)", mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "output-definition" } }, "output-definition": { description: "An output parameter for this action.", mapping: { properties: { description: { type: "string", description: "A string description of the output parameter.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_iddescription)" }, value: { type: "output-value", description: "The value that the output parameter will be mapped to. You can set this to a string or an expression with context.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_idvalue)" } } } }, "output-value": { description: "The value that the output parameter will be mapped to. You can set this to a string or an expression with context.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#outputsoutput_idvalue)", context: ["github", "strategy", "matrix", "steps", "inputs", "job", "runner", "env"], string: {} }, "runs-if": { description: "Condition to control when this action's pre or post script runs.", context: ["runner", "github", "job", "strategy", "matrix", "env", "inputs", "always(0,0)", "success(0,0)", "failure(0,0)", "cancelled(0,0)"], string: {} }, runs: { "one-of": ["container-runs", "node-runs", "composite-runs", "plugin-runs"] }, "runs-strict": { description: "Specifies whether this is a JavaScript action, a composite action, or a Docker container action and how the action is executed.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runs)", "one-of": ["container-runs-strict", "node-runs-strict", "composite-runs-strict"] }, "plugin-runs": { mapping: { properties: { plugin: "non-empty-string" } } }, "container-runs": { mapping: { properties: { using: "non-empty-string", image: "non-empty-string", entrypoint: "non-empty-string", args: "container-runs-args", env: "container-runs-env", "pre-entrypoint": "non-empty-string", "pre-if": "non-empty-string", "post-entrypoint": "non-empty-string", "post-if": "non-empty-string" } } }, "container-runs-args": { description: "An array of strings that define the inputs for a Docker container. Inputs can include hardcoded strings. GitHub passes the args to the container's ENTRYPOINT when the container starts up.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsargs)", sequence: { "item-type": "container-runs-context" } }, "container-runs-env": { description: "Specifies a key/value map of environment variables to set in the container environment.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsenv)", context: ["inputs"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, "container-runs-context": { context: ["inputs"], string: {} }, "node-runs": { mapping: { properties: { using: "non-empty-string", main: "non-empty-string", pre: "non-empty-string", "pre-if": "non-empty-string", post: "non-empty-string", "post-if": "non-empty-string" } } }, "composite-runs": { mapping: { properties: { using: "non-empty-string", steps: "composite-steps" } } }, "container-runs-strict": { description: "Configuration for Docker container actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runs)", mapping: { properties: { using: { type: "using", required: true, description: "The runtime used to execute the action. Must be docker for Docker container actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsusing)" }, image: { type: "non-empty-string", required: true, description: "The Docker image to use as the container to run the action. The value can be the Docker base image name, a local Dockerfile in your repository, or a public image in Docker Hub or another registry.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsimage)" }, entrypoint: { type: "non-empty-string", description: "Overrides the Docker ENTRYPOINT in the Dockerfile, or sets it if one wasn't already specified.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsentrypoint)" }, args: "container-runs-args", env: "container-runs-env", "pre-entrypoint": { type: "non-empty-string", description: "Allows you to run a script before the entrypoint action begins.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspre-entrypoint)" }, "pre-if": { type: "runs-if", description: "Allows you to define conditions for the pre: action execution. The pre: action will only run if the conditions in pre-if are met. If not set, then pre-if defaults to always().\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspre-if)" }, "post-entrypoint": { type: "non-empty-string", description: "Allows you to run a cleanup script once the runs.entrypoint action has completed.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspost-entrypoint)" }, "post-if": { type: "runs-if", description: "Allows you to define conditions for the post: action execution. The post: action will only run if the conditions in post-if are met. If not set, then post-if defaults to always().\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspost-if)" } } } }, "node-runs-strict": { description: "Configuration for JavaScript actions executed with Node.js.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runs)", mapping: { properties: { using: { type: "using", required: true, description: "The runtime used to execute the action. Use node20 or node24 for JavaScript actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsusing)" }, main: { type: "non-empty-string", required: true, description: "The file that contains your action code. The runtime specified in using executes this file.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsmain)" }, pre: { type: "non-empty-string", description: "Allows you to run a script at the start of a job, before the main: action begins. You can use pre: to run prerequisite setup scripts.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspre)" }, "pre-if": { type: "runs-if", description: "Allows you to define conditions for the pre: action execution. The pre: action will only run if the conditions in pre-if are met. If not set, then pre-if defaults to always().\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspre-if)" }, post: { type: "non-empty-string", description: "Allows you to run a script at the end of a job, once the main: action has completed. You can use post: to run cleanup scripts.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspost)" }, "post-if": { type: "runs-if", description: "Allows you to define conditions for the post: action execution. The post: action will only run if the conditions in post-if are met. If not set, then post-if defaults to always().\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runspost-if)" } } } }, "composite-runs-strict": { description: "Configuration for composite actions that run multiple steps.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runs)", mapping: { properties: { using: { type: "using", required: true, description: "The runtime used to execute the action. Must be composite for composite actions.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsusing)" }, steps: { type: "composite-steps", required: true } } } }, "composite-steps": { description: "The steps that you plan to run in this action. These can be either run steps or uses steps.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runssteps)", sequence: { "item-type": "composite-step" } }, "composite-step": { description: "A step within a composite action.", "one-of": ["run-step", "uses-step"] }, "run-step": { description: "Runs a command-line program using the operating system's shell.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsrun)", mapping: { properties: { name: { type: "string-steps-context", description: "A name for your step to display on GitHub.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsname)" }, id: { type: "non-empty-string", description: "A unique identifier for the step. You can use the id to reference the step in contexts.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsid)" }, if: { type: "step-if", description: "You can use the if conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsif)" }, run: { type: "string-steps-context", required: true, description: "The command you want to run. This can be inline or a script in your action repository.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsrun)" }, shell: { type: "string-steps-context", required: true, description: "The shell where you want to run the command. Any shell supported by the runner can be used. Required if run is set.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsshell)" }, env: "step-env", "continue-on-error": { type: "boolean-steps-context", description: "Prevents the action from failing when a step fails. Set to true to allow the action to pass when this step fails.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepscontinue-on-error)" }, "working-directory": { type: "string-steps-context", description: "Specifies the working directory where the command is run.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsworking-directory)" } } } }, "uses-step": { description: "Runs another action as part of a step in your action.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsuses)", mapping: { properties: { name: { type: "string-steps-context", description: "A name for your step to display on GitHub.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsname)" }, id: { type: "non-empty-string", description: "A unique identifier for the step. You can use the id to reference the step in contexts.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsid)" }, if: { type: "step-if", description: "You can use the if conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsif)" }, uses: { type: "non-empty-string", required: true, description: "Selects an action to run as part of a step in your action. An action is a reusable unit of code.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsuses)" }, with: "step-with", env: "step-env", "continue-on-error": { type: "boolean-steps-context", description: "Prevents the action from failing when a step fails. Set to true to allow the action to pass when this step fails.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepscontinue-on-error)" } } } }, "string-steps-context": { context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "hashFiles(1,255)"], string: {} }, "boolean-steps-context": { context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "hashFiles(1,255)"], boolean: {} }, "step-env": { description: "Sets variables for steps to use in the runner environment. You can also set variables for the entire action.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsenv)", context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "hashFiles(1,255)"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, "step-if": { description: "You can use the if conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepsif)", context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "always(0,0)", "failure(0,0)", "cancelled(0,0)", "success(0,0)", "hashFiles(1,255)"], string: {} }, "step-with": { description: "A map of the input parameters defined by the action. Each input parameter is a key/value pair.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)", context: ["github", "inputs", "strategy", "matrix", "steps", "job", "runner", "env", "hashFiles(1,255)"], mapping: { "loose-key-type": "non-empty-string", "loose-value-type": "string" } }, branding: { description: "You can use a color and Feather icon to create a badge to personalize and distinguish your action in GitHub Marketplace.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#branding)", mapping: { properties: { icon: { type: "branding-icon", description: "The name of the v4.28.0 Feather icon to use.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#brandingicon)" }, color: { type: "branding-color", description: "The background color of the badge.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#brandingcolor)" } } } }, "branding-icon": { description: "The name of the v4.28.0 Feather icon to use. Brand icons are omitted as well as: coffee, columns, divide-circle, divide-square, divide, frown, hexagon, key, meh, mouse-pointer, smile, tool, x-octagon.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#brandingicon)", "allowed-values": ["activity", "airplay", "alert-circle", "alert-octagon", "alert-triangle", "align-center", "align-justify", "align-left", "align-right", "anchor", "aperture", "archive", "arrow-down-circle", "arrow-down-left", "arrow-down-right", "arrow-down", "arrow-left-circle", "arrow-left", "arrow-right-circle", "arrow-right", "arrow-up-circle", "arrow-up-left", "arrow-up-right", "arrow-up", "at-sign", "award", "bar-chart-2", "bar-chart", "battery-charging", "battery", "bell-off", "bell", "bluetooth", "bold", "book-open", "book", "bookmark", "box", "briefcase", "calendar", "camera-off", "camera", "cast", "check-circle", "check-square", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevrons-down", "chevrons-left", "chevrons-right", "chevrons-up", "circle", "clipboard", "clock", "cloud-drizzle", "cloud-lightning", "cloud-off", "cloud-rain", "cloud-snow", "cloud", "code", "command", "compass", "copy", "corner-down-left", "corner-down-right", "corner-left-down", "corner-left-up", "corner-right-down", "corner-right-up", "corner-up-left", "corner-up-right", "cpu", "credit-card", "crop", "crosshair", "database", "delete", "disc", "dollar-sign", "download-cloud", "download", "droplet", "edit-2", "edit-3", "edit", "external-link", "eye-off", "eye", "fast-forward", "feather", "file-minus", "file-plus", "file-text", "file", "film", "filter", "flag", "folder-minus", "folder-plus", "folder", "gift", "git-branch", "git-commit", "git-merge", "git-pull-request", "globe", "grid", "hard-drive", "hash", "headphones", "heart", "help-circle", "home", "image", "inbox", "info", "italic", "layers", "layout", "life-buoy", "link-2", "link", "list", "loader", "lock", "log-in", "log-out", "mail", "map-pin", "map", "maximize-2", "maximize", "menu", "message-circle", "message-square", "mic-off", "mic", "minimize-2", "minimize", "minus-circle", "minus-square", "minus", "monitor", "moon", "more-horizontal", "more-vertical", "move", "music", "navigation-2", "navigation", "octagon", "package", "paperclip", "pause-circle", "pause", "percent", "phone-call", "phone-forwarded", "phone-incoming", "phone-missed", "phone-off", "phone-outgoing", "phone", "pie-chart", "play-circle", "play", "plus-circle", "plus-square", "plus", "pocket", "power", "printer", "radio", "refresh-ccw", "refresh-cw", "repeat", "rewind", "rotate-ccw", "rotate-cw", "rss", "save", "scissors", "search", "send", "server", "settings", "share-2", "share", "shield-off", "shield", "shopping-bag", "shopping-cart", "shuffle", "sidebar", "skip-back", "skip-forward", "slash", "sliders", "smartphone", "speaker", "square", "star", "stop-circle", "sun", "sunrise", "sunset", "tablet", "tag", "target", "terminal", "thermometer", "thumbs-down", "thumbs-up", "toggle-left", "toggle-right", "trash-2", "trash", "trending-down", "trending-up", "triangle", "truck", "tv", "type", "umbrella", "underline", "unlock", "upload-cloud", "upload", "user-check", "user-minus", "user-plus", "user-x", "user", "users", "video-off", "video", "voicemail", "volume-1", "volume-2", "volume-x", "volume", "watch", "wifi-off", "wifi", "wind", "x-circle", "x-square", "x", "zap-off", "zap", "zoom-in", "zoom-out"] }, "branding-color": { description: "The background color of the badge.\n\n[Documentation](https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#brandingcolor)", "allowed-values": ["white", "yellow", "blue", "green", "orange", "red", "purple", "gray-dark"] }, using: { description: "The runtime used to execute the action.", "allowed-values": ["docker", "node12", "node16", "node20", "node24", "composite"] }, "non-empty-string": { string: { "require-non-empty": true } } } };
|
|
23167
23166
|
|
|
23168
23167
|
// ../workflow-parser/dist/actions/action-schema.js
|
|
23169
23168
|
var schema2;
|
|
@@ -23218,9 +23217,6 @@ runs:
|
|
|
23218
23217
|
# const greeting = \\\`Hello \\\${name}\\\`;
|
|
23219
23218
|
# console.log(greeting);
|
|
23220
23219
|
# fs.appendFileSync(process.env.GITHUB_OUTPUT, \\\`greeting=\\\${greeting}\\\\n\\\`);
|
|
23221
|
-
#
|
|
23222
|
-
# For JavaScript actions with @actions/toolkit, see:
|
|
23223
|
-
# https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-javascript-action
|
|
23224
23220
|
`;
|
|
23225
23221
|
var ACTION_SNIPPET_NODEJS_RUNS = `inputs:
|
|
23226
23222
|
name:
|
|
@@ -23430,7 +23426,7 @@ function filterActionRunsCompletions(values, path, root) {
|
|
|
23430
23426
|
}
|
|
23431
23427
|
return values.filter((v) => allowedKeys.has(v.label.toLowerCase()));
|
|
23432
23428
|
}
|
|
23433
|
-
function getActionScaffoldingSnippets(root, path, position) {
|
|
23429
|
+
function getActionScaffoldingSnippets(root, path, position, replaceRange) {
|
|
23434
23430
|
let runsMapping;
|
|
23435
23431
|
if (root instanceof MappingToken) {
|
|
23436
23432
|
for (let i = 0; i < root.count; i++) {
|
|
@@ -23453,9 +23449,9 @@ function getActionScaffoldingSnippets(root, path, position) {
|
|
|
23453
23449
|
const isDirectlyInsideRuns = runsMappingIndex !== -1 && runsMappingIndex === path.length - 1;
|
|
23454
23450
|
if (isDirectlyInsideRuns) {
|
|
23455
23451
|
return [
|
|
23456
|
-
createSnippetCompletion("Node.js Action", "Scaffold a Node.js action", ACTION_SNIPPET_NODEJS_USING, position, "0_nodejs"),
|
|
23457
|
-
createSnippetCompletion("Composite Action", "Scaffold a composite action", ACTION_SNIPPET_COMPOSITE_USING, position, "1_composite"),
|
|
23458
|
-
createSnippetCompletion("Docker Action", "Scaffold a Docker action", ACTION_SNIPPET_DOCKER_USING, position, "2_docker")
|
|
23452
|
+
createSnippetCompletion("Node.js Action", "Scaffold a Node.js action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-javascript-action)", ACTION_SNIPPET_NODEJS_USING, position, "0_nodejs", replaceRange),
|
|
23453
|
+
createSnippetCompletion("Composite Action", "Scaffold a composite action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action)", ACTION_SNIPPET_COMPOSITE_USING, position, "1_composite", replaceRange),
|
|
23454
|
+
createSnippetCompletion("Docker Action", "Scaffold a Docker action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-docker-container-action)", ACTION_SNIPPET_DOCKER_USING, position, "2_docker", replaceRange)
|
|
23459
23455
|
];
|
|
23460
23456
|
}
|
|
23461
23457
|
const isAtRoot = path.length === 0 || path.length === 1 && path[0] === root;
|
|
@@ -23474,20 +23470,22 @@ function getActionScaffoldingSnippets(root, path, position) {
|
|
|
23474
23470
|
}
|
|
23475
23471
|
if (hasNameOrDescription) {
|
|
23476
23472
|
return [
|
|
23477
|
-
createSnippetCompletion("Node.js Action", "Scaffold a Node.js action", ACTION_SNIPPET_NODEJS_RUNS, position, "1_nodejs"),
|
|
23478
|
-
createSnippetCompletion("Composite Action", "Scaffold a composite action", ACTION_SNIPPET_COMPOSITE_RUNS, position, "2_composite"),
|
|
23479
|
-
createSnippetCompletion("Docker Action", "Scaffold a Docker action", ACTION_SNIPPET_DOCKER_RUNS, position, "3_docker")
|
|
23473
|
+
createSnippetCompletion("Node.js Action", "Scaffold a Node.js action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-javascript-action)", ACTION_SNIPPET_NODEJS_RUNS, position, "1_nodejs", replaceRange),
|
|
23474
|
+
createSnippetCompletion("Composite Action", "Scaffold a composite action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action)", ACTION_SNIPPET_COMPOSITE_RUNS, position, "2_composite", replaceRange),
|
|
23475
|
+
createSnippetCompletion("Docker Action", "Scaffold a Docker action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-docker-container-action)", ACTION_SNIPPET_DOCKER_RUNS, position, "3_docker", replaceRange)
|
|
23480
23476
|
];
|
|
23481
23477
|
}
|
|
23482
23478
|
return [
|
|
23483
|
-
createSnippetCompletion("Node.js Action", "Scaffold a complete Node.js action", ACTION_SNIPPET_NODEJS_FULL, position, "1_nodejs"),
|
|
23484
|
-
createSnippetCompletion("Composite Action", "Scaffold a complete composite action", ACTION_SNIPPET_COMPOSITE_FULL, position, "2_composite"),
|
|
23485
|
-
createSnippetCompletion("Docker Action", "Scaffold a complete Docker action", ACTION_SNIPPET_DOCKER_FULL, position, "3_docker")
|
|
23479
|
+
createSnippetCompletion("Node.js Action", "Scaffold a complete Node.js action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-javascript-action)", ACTION_SNIPPET_NODEJS_FULL, position, "1_nodejs", replaceRange),
|
|
23480
|
+
createSnippetCompletion("Composite Action", "Scaffold a complete composite action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action)", ACTION_SNIPPET_COMPOSITE_FULL, position, "2_composite", replaceRange),
|
|
23481
|
+
createSnippetCompletion("Docker Action", "Scaffold a complete Docker action\n\n[Documentation](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-docker-container-action)", ACTION_SNIPPET_DOCKER_FULL, position, "3_docker", replaceRange)
|
|
23486
23482
|
];
|
|
23487
23483
|
}
|
|
23488
|
-
function createSnippetCompletion(label, description, snippetText, position, sortText) {
|
|
23484
|
+
function createSnippetCompletion(label, description, snippetText, position, sortText, replaceRange) {
|
|
23485
|
+
const textEdit = replaceRange ? import_vscode_languageserver_types.TextEdit.replace(replaceRange, snippetText) : import_vscode_languageserver_types.TextEdit.insert(position, snippetText);
|
|
23489
23486
|
return {
|
|
23490
23487
|
label,
|
|
23488
|
+
labelDetails: { description: "snippet" },
|
|
23491
23489
|
kind: import_vscode_languageserver_types.CompletionItemKind.Snippet,
|
|
23492
23490
|
documentation: {
|
|
23493
23491
|
kind: "markdown",
|
|
@@ -23495,7 +23493,7 @@ function createSnippetCompletion(label, description, snippetText, position, sort
|
|
|
23495
23493
|
},
|
|
23496
23494
|
insertTextFormat: import_vscode_languageserver_types.InsertTextFormat.Snippet,
|
|
23497
23495
|
sortText,
|
|
23498
|
-
textEdit
|
|
23496
|
+
textEdit
|
|
23499
23497
|
};
|
|
23500
23498
|
}
|
|
23501
23499
|
|
|
@@ -24247,8 +24245,11 @@ function getDefaultActionContext(name, actionContext, mode) {
|
|
|
24247
24245
|
return getGithubContext(void 0, mode);
|
|
24248
24246
|
case "runner":
|
|
24249
24247
|
return getRunnerContext();
|
|
24250
|
-
case "env":
|
|
24251
|
-
|
|
24248
|
+
case "env": {
|
|
24249
|
+
const envContext2 = new DescriptionDictionary();
|
|
24250
|
+
envContext2.complete = false;
|
|
24251
|
+
return envContext2;
|
|
24252
|
+
}
|
|
24252
24253
|
case "job": {
|
|
24253
24254
|
const jobContext = new DescriptionDictionary();
|
|
24254
24255
|
jobContext.add("status", new data_exports.StringData(""), getDescription("job", "status"));
|
|
@@ -24262,8 +24263,11 @@ function getDefaultActionContext(name, actionContext, mode) {
|
|
|
24262
24263
|
}
|
|
24263
24264
|
case "strategy":
|
|
24264
24265
|
return getStrategyContext();
|
|
24265
|
-
case "matrix":
|
|
24266
|
-
|
|
24266
|
+
case "matrix": {
|
|
24267
|
+
const matrixContext = new DescriptionDictionary();
|
|
24268
|
+
matrixContext.complete = false;
|
|
24269
|
+
return matrixContext;
|
|
24270
|
+
}
|
|
24267
24271
|
}
|
|
24268
24272
|
return void 0;
|
|
24269
24273
|
}
|
|
@@ -25612,10 +25616,6 @@ async function complete2(textDocument, position, config) {
|
|
|
25612
25616
|
}
|
|
25613
25617
|
const escapeHatches = getEscapeHatchCompletions(token, keyToken, indentString, newPos, schema3);
|
|
25614
25618
|
values.push(...escapeHatches);
|
|
25615
|
-
let actionSnippets = [];
|
|
25616
|
-
if (isAction && config?.featureFlags?.isEnabled("actionScaffoldingSnippets")) {
|
|
25617
|
-
actionSnippets = getActionScaffoldingSnippets(parsedTemplate.value, path, position);
|
|
25618
|
-
}
|
|
25619
25619
|
let replaceRange;
|
|
25620
25620
|
if (token?.range) {
|
|
25621
25621
|
replaceRange = mapRange(token.range);
|
|
@@ -25632,6 +25632,10 @@ async function complete2(textDocument, position, config) {
|
|
|
25632
25632
|
replaceRange = import_vscode_languageserver_types2.Range.create({ line: position.line, character: position.character - val }, position);
|
|
25633
25633
|
}
|
|
25634
25634
|
}
|
|
25635
|
+
let actionSnippets = [];
|
|
25636
|
+
if (isAction) {
|
|
25637
|
+
actionSnippets = getActionScaffoldingSnippets(parsedTemplate.value, path, position, replaceRange);
|
|
25638
|
+
}
|
|
25635
25639
|
const completionItems = values.map((value) => {
|
|
25636
25640
|
const newText = value.insertText || value.label;
|
|
25637
25641
|
let textEdit;
|
|
@@ -26698,7 +26702,7 @@ function getInlayHints(document) {
|
|
|
26698
26702
|
}
|
|
26699
26703
|
|
|
26700
26704
|
// ../languageservice/dist/validate.js
|
|
26701
|
-
var
|
|
26705
|
+
var import_vscode_languageserver_types7 = __toESM(require_main2(), 1);
|
|
26702
26706
|
|
|
26703
26707
|
// ../languageservice/dist/expression-validation/error-dictionary.js
|
|
26704
26708
|
var AccessError = class extends Error {
|
|
@@ -26776,8 +26780,113 @@ var ValidationEvaluator = class extends Evaluator {
|
|
|
26776
26780
|
}
|
|
26777
26781
|
};
|
|
26778
26782
|
|
|
26779
|
-
// ../languageservice/dist/validate-
|
|
26783
|
+
// ../languageservice/dist/utils/validate-if.js
|
|
26784
|
+
function hasFormatWithLiteralText(expr) {
|
|
26785
|
+
if (expr instanceof Logical && expr.operator.lexeme === "&&" && expr.args.length === 2) {
|
|
26786
|
+
return hasFormatWithLiteralText(expr.args[1]);
|
|
26787
|
+
}
|
|
26788
|
+
if (!(expr instanceof FunctionCall)) {
|
|
26789
|
+
return false;
|
|
26790
|
+
}
|
|
26791
|
+
if (expr.functionName.lexeme.toLowerCase() !== "format") {
|
|
26792
|
+
return false;
|
|
26793
|
+
}
|
|
26794
|
+
if (expr.args.length < 1) {
|
|
26795
|
+
return false;
|
|
26796
|
+
}
|
|
26797
|
+
const firstArg = expr.args[0];
|
|
26798
|
+
if (!(firstArg instanceof Literal) || firstArg.literal.kind !== data_exports.Kind.String) {
|
|
26799
|
+
return false;
|
|
26800
|
+
}
|
|
26801
|
+
const formatString = firstArg.literal.coerceString();
|
|
26802
|
+
const trimmed = formatString.trim();
|
|
26803
|
+
let inToken = false;
|
|
26804
|
+
for (let i = 0; i < trimmed.length; i++) {
|
|
26805
|
+
if (!inToken && trimmed[i] === "{") {
|
|
26806
|
+
inToken = true;
|
|
26807
|
+
} else if (inToken && trimmed[i] === "}") {
|
|
26808
|
+
inToken = false;
|
|
26809
|
+
} else if (inToken && trimmed[i] >= "0" && trimmed[i] <= "9") {
|
|
26810
|
+
} else {
|
|
26811
|
+
return true;
|
|
26812
|
+
}
|
|
26813
|
+
}
|
|
26814
|
+
return false;
|
|
26815
|
+
}
|
|
26816
|
+
|
|
26817
|
+
// ../languageservice/dist/utils/validate-uses.js
|
|
26780
26818
|
var import_vscode_languageserver_types4 = __toESM(require_main2(), 1);
|
|
26819
|
+
var SHORT_SHA_PATTERN = /^[0-9a-f]{7,8}$/i;
|
|
26820
|
+
var SHORT_SHA_DOCS_URL = "https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions";
|
|
26821
|
+
function warnIfShortSha(diagnostics, token, ref) {
|
|
26822
|
+
if (SHORT_SHA_PATTERN.test(ref)) {
|
|
26823
|
+
diagnostics.push({
|
|
26824
|
+
message: `The provided ref '${ref}' may be a shortened commit SHA. If so, please use the full 40-character commit SHA instead, as short SHAs are not supported.`,
|
|
26825
|
+
severity: import_vscode_languageserver_types4.DiagnosticSeverity.Warning,
|
|
26826
|
+
range: mapRange(token.range),
|
|
26827
|
+
code: "short-sha-ref",
|
|
26828
|
+
codeDescription: {
|
|
26829
|
+
href: SHORT_SHA_DOCS_URL
|
|
26830
|
+
}
|
|
26831
|
+
});
|
|
26832
|
+
return true;
|
|
26833
|
+
}
|
|
26834
|
+
return false;
|
|
26835
|
+
}
|
|
26836
|
+
function validateStepUsesFormat(diagnostics, token) {
|
|
26837
|
+
const uses = token.value;
|
|
26838
|
+
if (!uses) {
|
|
26839
|
+
diagnostics.push({
|
|
26840
|
+
message: "'uses' value in action cannot be blank",
|
|
26841
|
+
severity: import_vscode_languageserver_types4.DiagnosticSeverity.Error,
|
|
26842
|
+
range: mapRange(token.range),
|
|
26843
|
+
code: "invalid-uses-format"
|
|
26844
|
+
});
|
|
26845
|
+
return;
|
|
26846
|
+
}
|
|
26847
|
+
if (uses.startsWith("docker://")) {
|
|
26848
|
+
return;
|
|
26849
|
+
}
|
|
26850
|
+
if (uses.startsWith("./") || uses.startsWith(".\\")) {
|
|
26851
|
+
return;
|
|
26852
|
+
}
|
|
26853
|
+
const atSegments = uses.split("@");
|
|
26854
|
+
if (atSegments.length !== 2) {
|
|
26855
|
+
addStepUsesFormatError(diagnostics, token);
|
|
26856
|
+
return;
|
|
26857
|
+
}
|
|
26858
|
+
const [repoPath, gitRef] = atSegments;
|
|
26859
|
+
if (!gitRef) {
|
|
26860
|
+
addStepUsesFormatError(diagnostics, token);
|
|
26861
|
+
return;
|
|
26862
|
+
}
|
|
26863
|
+
const pathSegments = repoPath.split(/[\\/]/);
|
|
26864
|
+
if (pathSegments.length < 2 || !pathSegments[0] || !pathSegments[1]) {
|
|
26865
|
+
addStepUsesFormatError(diagnostics, token);
|
|
26866
|
+
return;
|
|
26867
|
+
}
|
|
26868
|
+
if (pathSegments.length >= 4 && pathSegments[2] === ".github" && pathSegments[3] === "workflows") {
|
|
26869
|
+
diagnostics.push({
|
|
26870
|
+
message: "Reusable workflows should be referenced at the top-level `jobs.<job_id>.uses` key, not within steps",
|
|
26871
|
+
severity: import_vscode_languageserver_types4.DiagnosticSeverity.Error,
|
|
26872
|
+
range: mapRange(token.range),
|
|
26873
|
+
code: "invalid-uses-format"
|
|
26874
|
+
});
|
|
26875
|
+
return;
|
|
26876
|
+
}
|
|
26877
|
+
warnIfShortSha(diagnostics, token, gitRef);
|
|
26878
|
+
}
|
|
26879
|
+
function addStepUsesFormatError(diagnostics, token) {
|
|
26880
|
+
diagnostics.push({
|
|
26881
|
+
message: `Expected format {owner}/{repo}[/path]@{ref}. Actual '${token.value}'`,
|
|
26882
|
+
severity: import_vscode_languageserver_types4.DiagnosticSeverity.Error,
|
|
26883
|
+
range: mapRange(token.range),
|
|
26884
|
+
code: "invalid-uses-format"
|
|
26885
|
+
});
|
|
26886
|
+
}
|
|
26887
|
+
|
|
26888
|
+
// ../languageservice/dist/validate-action-reference.js
|
|
26889
|
+
var import_vscode_languageserver_types5 = __toESM(require_main2(), 1);
|
|
26781
26890
|
var DiagnosticCode = {
|
|
26782
26891
|
MissingRequiredInputs: "missing-required-inputs"
|
|
26783
26892
|
};
|
|
@@ -26792,7 +26901,7 @@ async function validateActionReference(diagnostics, stepToken, step, config) {
|
|
|
26792
26901
|
const actionMetadata = await config.actionsMetadataProvider.fetchActionMetadata(action);
|
|
26793
26902
|
if (actionMetadata === void 0) {
|
|
26794
26903
|
diagnostics.push({
|
|
26795
|
-
severity:
|
|
26904
|
+
severity: import_vscode_languageserver_types5.DiagnosticSeverity.Error,
|
|
26796
26905
|
range: mapRange(step.uses.range),
|
|
26797
26906
|
message: `Unable to resolve action \`${step.uses.value}\`, repository or version not found`
|
|
26798
26907
|
});
|
|
@@ -26820,7 +26929,7 @@ async function validateActionReference(diagnostics, stepToken, step, config) {
|
|
|
26820
26929
|
for (const [input, inputToken] of stepInputs) {
|
|
26821
26930
|
if (!actionInputs[input]) {
|
|
26822
26931
|
diagnostics.push({
|
|
26823
|
-
severity:
|
|
26932
|
+
severity: import_vscode_languageserver_types5.DiagnosticSeverity.Error,
|
|
26824
26933
|
range: mapRange(inputToken.range),
|
|
26825
26934
|
message: `Invalid action input '${input}'`
|
|
26826
26935
|
});
|
|
@@ -26828,7 +26937,7 @@ async function validateActionReference(diagnostics, stepToken, step, config) {
|
|
|
26828
26937
|
const deprecationMessage = actionInputs[input]?.deprecationMessage;
|
|
26829
26938
|
if (deprecationMessage) {
|
|
26830
26939
|
diagnostics.push({
|
|
26831
|
-
severity:
|
|
26940
|
+
severity: import_vscode_languageserver_types5.DiagnosticSeverity.Warning,
|
|
26832
26941
|
range: mapRange(inputToken.range),
|
|
26833
26942
|
message: deprecationMessage
|
|
26834
26943
|
});
|
|
@@ -26845,7 +26954,7 @@ async function validateActionReference(diagnostics, stepToken, step, config) {
|
|
|
26845
26954
|
}))
|
|
26846
26955
|
};
|
|
26847
26956
|
diagnostics.push({
|
|
26848
|
-
severity:
|
|
26957
|
+
severity: import_vscode_languageserver_types5.DiagnosticSeverity.Error,
|
|
26849
26958
|
range: mapRange((withKey || stepToken).range),
|
|
26850
26959
|
message,
|
|
26851
26960
|
code: DiagnosticCode.MissingRequiredInputs,
|
|
@@ -26855,7 +26964,132 @@ async function validateActionReference(diagnostics, stepToken, step, config) {
|
|
|
26855
26964
|
}
|
|
26856
26965
|
|
|
26857
26966
|
// ../languageservice/dist/validate-action.js
|
|
26858
|
-
var
|
|
26967
|
+
var import_vscode_languageserver_types6 = __toESM(require_main2(), 1);
|
|
26968
|
+
|
|
26969
|
+
// ../languageservice/dist/validate-format-string.js
|
|
26970
|
+
function validateFormatString(formatString) {
|
|
26971
|
+
let maxIndex = -1;
|
|
26972
|
+
let i = 0;
|
|
26973
|
+
while (i < formatString.length) {
|
|
26974
|
+
let lbrace = -1;
|
|
26975
|
+
for (let j = i; j < formatString.length; j++) {
|
|
26976
|
+
if (formatString[j] === "{") {
|
|
26977
|
+
lbrace = j;
|
|
26978
|
+
break;
|
|
26979
|
+
}
|
|
26980
|
+
}
|
|
26981
|
+
let rbrace = -1;
|
|
26982
|
+
for (let j = i; j < formatString.length; j++) {
|
|
26983
|
+
if (formatString[j] === "}") {
|
|
26984
|
+
rbrace = j;
|
|
26985
|
+
break;
|
|
26986
|
+
}
|
|
26987
|
+
}
|
|
26988
|
+
if (lbrace < 0 && rbrace < 0) {
|
|
26989
|
+
break;
|
|
26990
|
+
}
|
|
26991
|
+
if (lbrace >= 0 && (rbrace < 0 || lbrace < rbrace)) {
|
|
26992
|
+
if (lbrace + 1 < formatString.length && formatString[lbrace + 1] === "{") {
|
|
26993
|
+
i = lbrace + 2;
|
|
26994
|
+
continue;
|
|
26995
|
+
}
|
|
26996
|
+
rbrace = -1;
|
|
26997
|
+
for (let j = lbrace + 1; j < formatString.length; j++) {
|
|
26998
|
+
if (formatString[j] === "}") {
|
|
26999
|
+
rbrace = j;
|
|
27000
|
+
break;
|
|
27001
|
+
}
|
|
27002
|
+
}
|
|
27003
|
+
if (rbrace < 0) {
|
|
27004
|
+
return { valid: false, maxArgIndex: -1 };
|
|
27005
|
+
}
|
|
27006
|
+
if (rbrace === lbrace + 1) {
|
|
27007
|
+
return { valid: false, maxArgIndex: -1 };
|
|
27008
|
+
}
|
|
27009
|
+
let index = 0;
|
|
27010
|
+
for (let j = lbrace + 1; j < rbrace; j++) {
|
|
27011
|
+
const c = formatString[j];
|
|
27012
|
+
if (c < "0" || c > "9") {
|
|
27013
|
+
return { valid: false, maxArgIndex: -1 };
|
|
27014
|
+
}
|
|
27015
|
+
index = index * 10 + (c.charCodeAt(0) - "0".charCodeAt(0));
|
|
27016
|
+
}
|
|
27017
|
+
if (index > maxIndex) {
|
|
27018
|
+
maxIndex = index;
|
|
27019
|
+
}
|
|
27020
|
+
i = rbrace + 1;
|
|
27021
|
+
continue;
|
|
27022
|
+
}
|
|
27023
|
+
if (rbrace + 1 < formatString.length && formatString[rbrace + 1] === "}") {
|
|
27024
|
+
i = rbrace + 2;
|
|
27025
|
+
continue;
|
|
27026
|
+
}
|
|
27027
|
+
return { valid: false, maxArgIndex: -1 };
|
|
27028
|
+
}
|
|
27029
|
+
return { valid: true, maxArgIndex: maxIndex };
|
|
27030
|
+
}
|
|
27031
|
+
function validateFormatCalls(expr) {
|
|
27032
|
+
const errors = [];
|
|
27033
|
+
const stack = [expr];
|
|
27034
|
+
while (stack.length > 0) {
|
|
27035
|
+
const node = stack.pop();
|
|
27036
|
+
if (!node) {
|
|
27037
|
+
continue;
|
|
27038
|
+
}
|
|
27039
|
+
if (node instanceof FunctionCall) {
|
|
27040
|
+
if (node.functionName.lexeme.toLowerCase() === "format") {
|
|
27041
|
+
const error2 = validateSingleFormatCall(node);
|
|
27042
|
+
if (error2) {
|
|
27043
|
+
errors.push(error2);
|
|
27044
|
+
}
|
|
27045
|
+
}
|
|
27046
|
+
for (const arg of node.args) {
|
|
27047
|
+
stack.push(arg);
|
|
27048
|
+
}
|
|
27049
|
+
} else if (node instanceof Binary) {
|
|
27050
|
+
stack.push(node.left, node.right);
|
|
27051
|
+
} else if (node instanceof Unary) {
|
|
27052
|
+
stack.push(node.expr);
|
|
27053
|
+
} else if (node instanceof Logical) {
|
|
27054
|
+
for (const arg of node.args) {
|
|
27055
|
+
stack.push(arg);
|
|
27056
|
+
}
|
|
27057
|
+
} else if (node instanceof Grouping) {
|
|
27058
|
+
stack.push(node.group);
|
|
27059
|
+
} else if (node instanceof IndexAccess) {
|
|
27060
|
+
stack.push(node.expr, node.index);
|
|
27061
|
+
}
|
|
27062
|
+
}
|
|
27063
|
+
return errors;
|
|
27064
|
+
}
|
|
27065
|
+
function validateSingleFormatCall(fc) {
|
|
27066
|
+
if (fc.args.length < 1) {
|
|
27067
|
+
return void 0;
|
|
27068
|
+
}
|
|
27069
|
+
const firstArg = fc.args[0];
|
|
27070
|
+
if (!(firstArg instanceof Literal) || firstArg.literal.kind !== Kind.String) {
|
|
27071
|
+
return void 0;
|
|
27072
|
+
}
|
|
27073
|
+
const formatString = firstArg.literal.coerceString();
|
|
27074
|
+
const numArgs = fc.args.length - 1;
|
|
27075
|
+
const { valid, maxArgIndex } = validateFormatString(formatString);
|
|
27076
|
+
if (!valid) {
|
|
27077
|
+
return {
|
|
27078
|
+
type: "invalid-syntax",
|
|
27079
|
+
message: "Format string has invalid syntax (missing closing brace, unescaped braces, or invalid placeholder)"
|
|
27080
|
+
};
|
|
27081
|
+
}
|
|
27082
|
+
if (maxArgIndex >= numArgs) {
|
|
27083
|
+
return {
|
|
27084
|
+
type: "arg-count-mismatch",
|
|
27085
|
+
expected: maxArgIndex + 1,
|
|
27086
|
+
provided: numArgs
|
|
27087
|
+
};
|
|
27088
|
+
}
|
|
27089
|
+
return void 0;
|
|
27090
|
+
}
|
|
27091
|
+
|
|
27092
|
+
// ../languageservice/dist/validate-action.js
|
|
26859
27093
|
var NODE_KEYS = /* @__PURE__ */ new Set(["using", "main", "pre", "post", "pre-if", "post-if"]);
|
|
26860
27094
|
var COMPOSITE_KEYS = /* @__PURE__ */ new Set(["using", "steps"]);
|
|
26861
27095
|
var DOCKER_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -26889,9 +27123,9 @@ async function validateAction(textDocument, config) {
|
|
|
26889
27123
|
}
|
|
26890
27124
|
for (const err of schemaErrors) {
|
|
26891
27125
|
const range = mapRange(err.range);
|
|
26892
|
-
let severity =
|
|
27126
|
+
let severity = import_vscode_languageserver_types6.DiagnosticSeverity.Error;
|
|
26893
27127
|
if (err.rawMessage.includes("deprecated")) {
|
|
26894
|
-
severity =
|
|
27128
|
+
severity = import_vscode_languageserver_types6.DiagnosticSeverity.Warning;
|
|
26895
27129
|
}
|
|
26896
27130
|
diagnostics.push({
|
|
26897
27131
|
message: err.rawMessage,
|
|
@@ -26913,25 +27147,161 @@ async function validateAction(textDocument, config) {
|
|
|
26913
27147
|
if (isActionStep(step) && isMapping(stepToken)) {
|
|
26914
27148
|
await validateActionReference(diagnostics, stepToken, step, config);
|
|
26915
27149
|
}
|
|
27150
|
+
if (isMapping(stepToken)) {
|
|
27151
|
+
validateCompositeStepTokens(diagnostics, stepToken);
|
|
27152
|
+
}
|
|
26916
27153
|
}
|
|
26917
27154
|
}
|
|
26918
27155
|
}
|
|
27156
|
+
const runsMapping = findRunsMapping(result.value);
|
|
27157
|
+
if (runsMapping) {
|
|
27158
|
+
validateRunsIfConditions(diagnostics, runsMapping);
|
|
27159
|
+
}
|
|
27160
|
+
validateAllExpressions(diagnostics, result.value);
|
|
26919
27161
|
}
|
|
26920
27162
|
} catch (e) {
|
|
26921
27163
|
error(`Unhandled error while validating action file: ${e.message}`);
|
|
26922
27164
|
}
|
|
26923
27165
|
return diagnostics;
|
|
26924
27166
|
}
|
|
26925
|
-
function
|
|
26926
|
-
for (
|
|
26927
|
-
|
|
26928
|
-
|
|
27167
|
+
function validateCompositeStepTokens(diagnostics, stepToken) {
|
|
27168
|
+
for (let i = 0; i < stepToken.count; i++) {
|
|
27169
|
+
const { key, value } = stepToken.get(i);
|
|
27170
|
+
const keyStr = isString(key) ? key.value.toLowerCase() : "";
|
|
27171
|
+
if (keyStr === "uses" && isString(value)) {
|
|
27172
|
+
validateStepUsesFormat(diagnostics, value);
|
|
27173
|
+
}
|
|
27174
|
+
if (keyStr === "if" && value.range) {
|
|
27175
|
+
if (isString(value)) {
|
|
27176
|
+
validateIfCondition(diagnostics, value);
|
|
27177
|
+
} else if (isBasicExpression(value)) {
|
|
27178
|
+
validateIfConditionExpression(diagnostics, value);
|
|
27179
|
+
}
|
|
26929
27180
|
}
|
|
26930
27181
|
}
|
|
26931
|
-
return void 0;
|
|
26932
27182
|
}
|
|
26933
|
-
function
|
|
26934
|
-
const
|
|
27183
|
+
function validateIfCondition(diagnostics, token) {
|
|
27184
|
+
const condition = token.value.trim();
|
|
27185
|
+
if (!condition) {
|
|
27186
|
+
return;
|
|
27187
|
+
}
|
|
27188
|
+
const allowedContext = token.definitionInfo?.allowedContext || [];
|
|
27189
|
+
const { namedContexts, functions } = splitAllowedContext(allowedContext);
|
|
27190
|
+
const finalCondition = ensureStatusFunction(condition, token.definitionInfo);
|
|
27191
|
+
const expressionToken = new BasicExpressionToken(token.file, token.range, finalCondition, token.definitionInfo, void 0, token.source, void 0, token.blockScalarHeader);
|
|
27192
|
+
try {
|
|
27193
|
+
const l = new Lexer(expressionToken.expression);
|
|
27194
|
+
const lr = l.lex();
|
|
27195
|
+
const p = new Parser(lr.tokens, namedContexts, functions);
|
|
27196
|
+
const expr = p.parse();
|
|
27197
|
+
if (hasFormatWithLiteralText(expr)) {
|
|
27198
|
+
diagnostics.push({
|
|
27199
|
+
message: "Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?",
|
|
27200
|
+
range: mapRange(token.range),
|
|
27201
|
+
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27202
|
+
code: "expression-literal-text-in-condition"
|
|
27203
|
+
});
|
|
27204
|
+
}
|
|
27205
|
+
validateFormatCallsAndAddDiagnostics(diagnostics, expr, token.range);
|
|
27206
|
+
} catch {
|
|
27207
|
+
}
|
|
27208
|
+
}
|
|
27209
|
+
function validateIfConditionExpression(diagnostics, token) {
|
|
27210
|
+
const allowedContext = token.definitionInfo?.allowedContext || [];
|
|
27211
|
+
const { namedContexts, functions } = splitAllowedContext(allowedContext);
|
|
27212
|
+
try {
|
|
27213
|
+
const l = new Lexer(token.expression);
|
|
27214
|
+
const lr = l.lex();
|
|
27215
|
+
const p = new Parser(lr.tokens, namedContexts, functions);
|
|
27216
|
+
const expr = p.parse();
|
|
27217
|
+
if (hasFormatWithLiteralText(expr)) {
|
|
27218
|
+
diagnostics.push({
|
|
27219
|
+
message: "Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?",
|
|
27220
|
+
range: mapRange(token.range),
|
|
27221
|
+
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27222
|
+
code: "expression-literal-text-in-condition"
|
|
27223
|
+
});
|
|
27224
|
+
}
|
|
27225
|
+
} catch {
|
|
27226
|
+
}
|
|
27227
|
+
}
|
|
27228
|
+
function validateFormatCallsAndAddDiagnostics(diagnostics, expr, range) {
|
|
27229
|
+
const formatErrors = validateFormatCalls(expr);
|
|
27230
|
+
for (const formatError of formatErrors) {
|
|
27231
|
+
if (formatError.type === "invalid-syntax") {
|
|
27232
|
+
diagnostics.push({
|
|
27233
|
+
message: `Invalid format string: ${formatError.message}`,
|
|
27234
|
+
range: mapRange(range),
|
|
27235
|
+
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27236
|
+
code: "invalid-format-string"
|
|
27237
|
+
});
|
|
27238
|
+
} else if (formatError.type === "arg-count-mismatch") {
|
|
27239
|
+
diagnostics.push({
|
|
27240
|
+
message: `Format string references argument {${formatError.expected - 1}} but only ${formatError.provided} argument(s) provided`,
|
|
27241
|
+
range: mapRange(range),
|
|
27242
|
+
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27243
|
+
code: "format-arg-count-mismatch"
|
|
27244
|
+
});
|
|
27245
|
+
}
|
|
27246
|
+
}
|
|
27247
|
+
}
|
|
27248
|
+
function findStepsSequence(root) {
|
|
27249
|
+
for (const [, token] of TemplateToken.traverse(root)) {
|
|
27250
|
+
if (token.definition?.key === "composite-steps" && token instanceof SequenceToken) {
|
|
27251
|
+
return token;
|
|
27252
|
+
}
|
|
27253
|
+
}
|
|
27254
|
+
return void 0;
|
|
27255
|
+
}
|
|
27256
|
+
function findRunsMapping(root) {
|
|
27257
|
+
if (root instanceof MappingToken) {
|
|
27258
|
+
for (let i = 0; i < root.count; i++) {
|
|
27259
|
+
const { key, value } = root.get(i);
|
|
27260
|
+
if (key.toString().toLowerCase() === "runs" && value instanceof MappingToken) {
|
|
27261
|
+
return value;
|
|
27262
|
+
}
|
|
27263
|
+
}
|
|
27264
|
+
}
|
|
27265
|
+
return void 0;
|
|
27266
|
+
}
|
|
27267
|
+
function validateRunsIfConditions(diagnostics, runsMapping) {
|
|
27268
|
+
for (let i = 0; i < runsMapping.count; i++) {
|
|
27269
|
+
const { key, value } = runsMapping.get(i);
|
|
27270
|
+
const keyStr = key.toString().toLowerCase();
|
|
27271
|
+
if ((keyStr === "pre-if" || keyStr === "post-if") && value.range) {
|
|
27272
|
+
if (isString(value)) {
|
|
27273
|
+
validateIfCondition(diagnostics, value);
|
|
27274
|
+
} else if (isBasicExpression(value)) {
|
|
27275
|
+
diagnostics.push({
|
|
27276
|
+
message: `Explicit expression syntax \${{ }} is not supported for '${keyStr}'. Remove the \${{ }} markers and use the expression directly.`,
|
|
27277
|
+
range: mapRange(value.range),
|
|
27278
|
+
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27279
|
+
code: "explicit-expression-not-allowed"
|
|
27280
|
+
});
|
|
27281
|
+
}
|
|
27282
|
+
}
|
|
27283
|
+
}
|
|
27284
|
+
}
|
|
27285
|
+
function validateAllExpressions(diagnostics, root) {
|
|
27286
|
+
for (const [, token] of TemplateToken.traverse(root)) {
|
|
27287
|
+
if (token instanceof BasicExpressionToken) {
|
|
27288
|
+
for (const expression of token.originalExpressions || [token]) {
|
|
27289
|
+
const allowedContext = expression.definitionInfo?.allowedContext || [];
|
|
27290
|
+
const { namedContexts, functions } = splitAllowedContext(allowedContext);
|
|
27291
|
+
try {
|
|
27292
|
+
const l = new Lexer(expression.expression);
|
|
27293
|
+
const lr = l.lex();
|
|
27294
|
+
const p = new Parser(lr.tokens, namedContexts, functions);
|
|
27295
|
+
const expr = p.parse();
|
|
27296
|
+
validateFormatCallsAndAddDiagnostics(diagnostics, expr, expression.range);
|
|
27297
|
+
} catch {
|
|
27298
|
+
}
|
|
27299
|
+
}
|
|
27300
|
+
}
|
|
27301
|
+
}
|
|
27302
|
+
}
|
|
27303
|
+
function validateRunsKeysAndFilterErrors(root, schemaErrors) {
|
|
27304
|
+
const diagnostics = [];
|
|
26935
27305
|
let runsMapping;
|
|
26936
27306
|
if (root instanceof MappingToken) {
|
|
26937
27307
|
for (let i = 0; i < root.count; i++) {
|
|
@@ -26984,7 +27354,7 @@ function validateRunsKeysAndFilterErrors(root, schemaErrors) {
|
|
|
26984
27354
|
const keyStr = key.toString().toLowerCase();
|
|
26985
27355
|
if (!allowedKeys.has(keyStr)) {
|
|
26986
27356
|
diagnostics.push({
|
|
26987
|
-
severity:
|
|
27357
|
+
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
26988
27358
|
range: mapRange(key.range),
|
|
26989
27359
|
message: `'${key.toString()}' is not valid for ${actionType} actions (using: ${usingValue})`
|
|
26990
27360
|
});
|
|
@@ -27001,7 +27371,7 @@ function validateRunsKeysAndFilterErrors(root, schemaErrors) {
|
|
|
27001
27371
|
}
|
|
27002
27372
|
}
|
|
27003
27373
|
diagnostics.push({
|
|
27004
|
-
severity:
|
|
27374
|
+
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27005
27375
|
range: mapRange(usingKeyRange),
|
|
27006
27376
|
message: `'${requiredKey}' is required for ${actionType} actions (using: ${usingValue})`
|
|
27007
27377
|
});
|
|
@@ -27024,129 +27394,6 @@ function validateRunsKeysAndFilterErrors(root, schemaErrors) {
|
|
|
27024
27394
|
return diagnostics;
|
|
27025
27395
|
}
|
|
27026
27396
|
|
|
27027
|
-
// ../languageservice/dist/validate-format-string.js
|
|
27028
|
-
function validateFormatString(formatString) {
|
|
27029
|
-
let maxIndex = -1;
|
|
27030
|
-
let i = 0;
|
|
27031
|
-
while (i < formatString.length) {
|
|
27032
|
-
let lbrace = -1;
|
|
27033
|
-
for (let j = i; j < formatString.length; j++) {
|
|
27034
|
-
if (formatString[j] === "{") {
|
|
27035
|
-
lbrace = j;
|
|
27036
|
-
break;
|
|
27037
|
-
}
|
|
27038
|
-
}
|
|
27039
|
-
let rbrace = -1;
|
|
27040
|
-
for (let j = i; j < formatString.length; j++) {
|
|
27041
|
-
if (formatString[j] === "}") {
|
|
27042
|
-
rbrace = j;
|
|
27043
|
-
break;
|
|
27044
|
-
}
|
|
27045
|
-
}
|
|
27046
|
-
if (lbrace < 0 && rbrace < 0) {
|
|
27047
|
-
break;
|
|
27048
|
-
}
|
|
27049
|
-
if (lbrace >= 0 && (rbrace < 0 || lbrace < rbrace)) {
|
|
27050
|
-
if (lbrace + 1 < formatString.length && formatString[lbrace + 1] === "{") {
|
|
27051
|
-
i = lbrace + 2;
|
|
27052
|
-
continue;
|
|
27053
|
-
}
|
|
27054
|
-
rbrace = -1;
|
|
27055
|
-
for (let j = lbrace + 1; j < formatString.length; j++) {
|
|
27056
|
-
if (formatString[j] === "}") {
|
|
27057
|
-
rbrace = j;
|
|
27058
|
-
break;
|
|
27059
|
-
}
|
|
27060
|
-
}
|
|
27061
|
-
if (rbrace < 0) {
|
|
27062
|
-
return { valid: false, maxArgIndex: -1 };
|
|
27063
|
-
}
|
|
27064
|
-
if (rbrace === lbrace + 1) {
|
|
27065
|
-
return { valid: false, maxArgIndex: -1 };
|
|
27066
|
-
}
|
|
27067
|
-
let index = 0;
|
|
27068
|
-
for (let j = lbrace + 1; j < rbrace; j++) {
|
|
27069
|
-
const c = formatString[j];
|
|
27070
|
-
if (c < "0" || c > "9") {
|
|
27071
|
-
return { valid: false, maxArgIndex: -1 };
|
|
27072
|
-
}
|
|
27073
|
-
index = index * 10 + (c.charCodeAt(0) - "0".charCodeAt(0));
|
|
27074
|
-
}
|
|
27075
|
-
if (index > maxIndex) {
|
|
27076
|
-
maxIndex = index;
|
|
27077
|
-
}
|
|
27078
|
-
i = rbrace + 1;
|
|
27079
|
-
continue;
|
|
27080
|
-
}
|
|
27081
|
-
if (rbrace + 1 < formatString.length && formatString[rbrace + 1] === "}") {
|
|
27082
|
-
i = rbrace + 2;
|
|
27083
|
-
continue;
|
|
27084
|
-
}
|
|
27085
|
-
return { valid: false, maxArgIndex: -1 };
|
|
27086
|
-
}
|
|
27087
|
-
return { valid: true, maxArgIndex: maxIndex };
|
|
27088
|
-
}
|
|
27089
|
-
function validateFormatCalls(expr) {
|
|
27090
|
-
const errors = [];
|
|
27091
|
-
const stack = [expr];
|
|
27092
|
-
while (stack.length > 0) {
|
|
27093
|
-
const node = stack.pop();
|
|
27094
|
-
if (!node) {
|
|
27095
|
-
continue;
|
|
27096
|
-
}
|
|
27097
|
-
if (node instanceof FunctionCall) {
|
|
27098
|
-
if (node.functionName.lexeme.toLowerCase() === "format") {
|
|
27099
|
-
const error2 = validateSingleFormatCall(node);
|
|
27100
|
-
if (error2) {
|
|
27101
|
-
errors.push(error2);
|
|
27102
|
-
}
|
|
27103
|
-
}
|
|
27104
|
-
for (const arg of node.args) {
|
|
27105
|
-
stack.push(arg);
|
|
27106
|
-
}
|
|
27107
|
-
} else if (node instanceof Binary) {
|
|
27108
|
-
stack.push(node.left, node.right);
|
|
27109
|
-
} else if (node instanceof Unary) {
|
|
27110
|
-
stack.push(node.expr);
|
|
27111
|
-
} else if (node instanceof Logical) {
|
|
27112
|
-
for (const arg of node.args) {
|
|
27113
|
-
stack.push(arg);
|
|
27114
|
-
}
|
|
27115
|
-
} else if (node instanceof Grouping) {
|
|
27116
|
-
stack.push(node.group);
|
|
27117
|
-
} else if (node instanceof IndexAccess) {
|
|
27118
|
-
stack.push(node.expr, node.index);
|
|
27119
|
-
}
|
|
27120
|
-
}
|
|
27121
|
-
return errors;
|
|
27122
|
-
}
|
|
27123
|
-
function validateSingleFormatCall(fc) {
|
|
27124
|
-
if (fc.args.length < 1) {
|
|
27125
|
-
return void 0;
|
|
27126
|
-
}
|
|
27127
|
-
const firstArg = fc.args[0];
|
|
27128
|
-
if (!(firstArg instanceof Literal) || firstArg.literal.kind !== Kind.String) {
|
|
27129
|
-
return void 0;
|
|
27130
|
-
}
|
|
27131
|
-
const formatString = firstArg.literal.coerceString();
|
|
27132
|
-
const numArgs = fc.args.length - 1;
|
|
27133
|
-
const { valid, maxArgIndex } = validateFormatString(formatString);
|
|
27134
|
-
if (!valid) {
|
|
27135
|
-
return {
|
|
27136
|
-
type: "invalid-syntax",
|
|
27137
|
-
message: "Format string has invalid syntax (missing closing brace, unescaped braces, or invalid placeholder)"
|
|
27138
|
-
};
|
|
27139
|
-
}
|
|
27140
|
-
if (maxArgIndex >= numArgs) {
|
|
27141
|
-
return {
|
|
27142
|
-
type: "arg-count-mismatch",
|
|
27143
|
-
expected: maxArgIndex + 1,
|
|
27144
|
-
provided: numArgs
|
|
27145
|
-
};
|
|
27146
|
-
}
|
|
27147
|
-
return void 0;
|
|
27148
|
-
}
|
|
27149
|
-
|
|
27150
27397
|
// ../languageservice/dist/validate.js
|
|
27151
27398
|
var CRON_SCHEDULE_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#onschedule";
|
|
27152
27399
|
async function validate(textDocument, config) {
|
|
@@ -27245,7 +27492,7 @@ function invalidValue(diagnostics, token, kind) {
|
|
|
27245
27492
|
case ValueProviderKind.AllowedValues:
|
|
27246
27493
|
diagnostics.push({
|
|
27247
27494
|
message: `Value '${token.value}' is not valid`,
|
|
27248
|
-
severity:
|
|
27495
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Error,
|
|
27249
27496
|
range: mapRange(token.range)
|
|
27250
27497
|
});
|
|
27251
27498
|
break;
|
|
@@ -27264,7 +27511,7 @@ function validateCronExpression(diagnostics, token) {
|
|
|
27264
27511
|
diagnostics.push({
|
|
27265
27512
|
message: `Actions schedules run at most every 5 minutes. "${cronValue}" (${description.toLowerCase()}) will not run as frequently as specified.`,
|
|
27266
27513
|
range: mapRange(token.range),
|
|
27267
|
-
severity:
|
|
27514
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Warning,
|
|
27268
27515
|
code: "on-schedule",
|
|
27269
27516
|
codeDescription: {
|
|
27270
27517
|
href: CRON_SCHEDULE_DOCS_URL
|
|
@@ -27272,74 +27519,6 @@ function validateCronExpression(diagnostics, token) {
|
|
|
27272
27519
|
});
|
|
27273
27520
|
}
|
|
27274
27521
|
}
|
|
27275
|
-
var SHORT_SHA_PATTERN = /^[0-9a-f]{7,8}$/i;
|
|
27276
|
-
var SHORT_SHA_DOCS_URL = "https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions";
|
|
27277
|
-
function warnIfShortSha(diagnostics, token, ref) {
|
|
27278
|
-
if (SHORT_SHA_PATTERN.test(ref)) {
|
|
27279
|
-
diagnostics.push({
|
|
27280
|
-
message: `The provided ref '${ref}' may be a shortened commit SHA. If so, please use the full 40-character commit SHA instead, as short SHAs are not supported.`,
|
|
27281
|
-
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Warning,
|
|
27282
|
-
range: mapRange(token.range),
|
|
27283
|
-
code: "short-sha-ref",
|
|
27284
|
-
codeDescription: {
|
|
27285
|
-
href: SHORT_SHA_DOCS_URL
|
|
27286
|
-
}
|
|
27287
|
-
});
|
|
27288
|
-
return true;
|
|
27289
|
-
}
|
|
27290
|
-
return false;
|
|
27291
|
-
}
|
|
27292
|
-
function validateStepUsesFormat(diagnostics, token) {
|
|
27293
|
-
const uses = token.value;
|
|
27294
|
-
if (!uses) {
|
|
27295
|
-
diagnostics.push({
|
|
27296
|
-
message: "`uses' value in action cannot be blank",
|
|
27297
|
-
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27298
|
-
range: mapRange(token.range),
|
|
27299
|
-
code: "invalid-uses-format"
|
|
27300
|
-
});
|
|
27301
|
-
return;
|
|
27302
|
-
}
|
|
27303
|
-
if (uses.startsWith("docker://")) {
|
|
27304
|
-
return;
|
|
27305
|
-
}
|
|
27306
|
-
if (uses.startsWith("./") || uses.startsWith(".\\")) {
|
|
27307
|
-
return;
|
|
27308
|
-
}
|
|
27309
|
-
const atSegments = uses.split("@");
|
|
27310
|
-
if (atSegments.length !== 2) {
|
|
27311
|
-
addStepUsesFormatError(diagnostics, token);
|
|
27312
|
-
return;
|
|
27313
|
-
}
|
|
27314
|
-
const [repoPath, gitRef] = atSegments;
|
|
27315
|
-
if (!gitRef) {
|
|
27316
|
-
addStepUsesFormatError(diagnostics, token);
|
|
27317
|
-
return;
|
|
27318
|
-
}
|
|
27319
|
-
const pathSegments = repoPath.split(/[\\/]/);
|
|
27320
|
-
if (pathSegments.length < 2 || !pathSegments[0] || !pathSegments[1]) {
|
|
27321
|
-
addStepUsesFormatError(diagnostics, token);
|
|
27322
|
-
return;
|
|
27323
|
-
}
|
|
27324
|
-
if (pathSegments.length >= 4 && pathSegments[2] === ".github" && pathSegments[3] === "workflows") {
|
|
27325
|
-
diagnostics.push({
|
|
27326
|
-
message: "Reusable workflows should be referenced at the top-level `jobs.<job_id>.uses` key, not within steps",
|
|
27327
|
-
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27328
|
-
range: mapRange(token.range),
|
|
27329
|
-
code: "invalid-uses-format"
|
|
27330
|
-
});
|
|
27331
|
-
return;
|
|
27332
|
-
}
|
|
27333
|
-
warnIfShortSha(diagnostics, token, gitRef);
|
|
27334
|
-
}
|
|
27335
|
-
function addStepUsesFormatError(diagnostics, token) {
|
|
27336
|
-
diagnostics.push({
|
|
27337
|
-
message: `Expected format {owner}/{repo}[/path]@{ref}. Actual '${token.value}'`,
|
|
27338
|
-
severity: import_vscode_languageserver_types6.DiagnosticSeverity.Error,
|
|
27339
|
-
range: mapRange(token.range),
|
|
27340
|
-
code: "invalid-uses-format"
|
|
27341
|
-
});
|
|
27342
|
-
}
|
|
27343
27522
|
function validateWorkflowUsesFormat(diagnostics, token) {
|
|
27344
27523
|
const uses = token.value;
|
|
27345
27524
|
if (uses.startsWith("./.github/workflows/") || uses.startsWith("./.github/workflows-lab/")) {
|
|
@@ -27424,7 +27603,7 @@ function validateWorkflowUsesFormat(diagnostics, token) {
|
|
|
27424
27603
|
function addWorkflowUsesFormatError(diagnostics, token, reason) {
|
|
27425
27604
|
diagnostics.push({
|
|
27426
27605
|
message: `Invalid workflow reference '${token.value}': ${reason}`,
|
|
27427
|
-
severity:
|
|
27606
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Error,
|
|
27428
27607
|
range: mapRange(token.range),
|
|
27429
27608
|
code: "invalid-workflow-uses-format"
|
|
27430
27609
|
});
|
|
@@ -27475,38 +27654,6 @@ function getProviderContext(documentUri, template, root, tokenRange) {
|
|
|
27475
27654
|
}, root);
|
|
27476
27655
|
return getWorkflowContext(documentUri, template, path);
|
|
27477
27656
|
}
|
|
27478
|
-
function hasFormatWithLiteralText(expr) {
|
|
27479
|
-
if (expr instanceof Logical && expr.operator.lexeme === "&&" && expr.args.length === 2) {
|
|
27480
|
-
return hasFormatWithLiteralText(expr.args[1]);
|
|
27481
|
-
}
|
|
27482
|
-
if (!(expr instanceof FunctionCall)) {
|
|
27483
|
-
return false;
|
|
27484
|
-
}
|
|
27485
|
-
if (expr.functionName.lexeme.toLowerCase() !== "format") {
|
|
27486
|
-
return false;
|
|
27487
|
-
}
|
|
27488
|
-
if (expr.args.length < 1) {
|
|
27489
|
-
return false;
|
|
27490
|
-
}
|
|
27491
|
-
const firstArg = expr.args[0];
|
|
27492
|
-
if (!(firstArg instanceof Literal) || firstArg.literal.kind !== data_exports.Kind.String) {
|
|
27493
|
-
return false;
|
|
27494
|
-
}
|
|
27495
|
-
const formatString = firstArg.literal.coerceString();
|
|
27496
|
-
const trimmed = formatString.trim();
|
|
27497
|
-
let inToken = false;
|
|
27498
|
-
for (let i = 0; i < trimmed.length; i++) {
|
|
27499
|
-
if (!inToken && trimmed[i] === "{") {
|
|
27500
|
-
inToken = true;
|
|
27501
|
-
} else if (inToken && trimmed[i] === "}") {
|
|
27502
|
-
inToken = false;
|
|
27503
|
-
} else if (inToken && trimmed[i] >= "0" && trimmed[i] <= "9") {
|
|
27504
|
-
} else {
|
|
27505
|
-
return true;
|
|
27506
|
-
}
|
|
27507
|
-
}
|
|
27508
|
-
return false;
|
|
27509
|
-
}
|
|
27510
27657
|
async function validateExpression(diagnostics, token, allowedContext, contextProviderConfig, workflowContext, keyDefinitionKey) {
|
|
27511
27658
|
const { namedContexts, functions } = splitAllowedContext(allowedContext);
|
|
27512
27659
|
const definitionKey = keyDefinitionKey || token.definitionInfo?.definition?.key;
|
|
@@ -27520,7 +27667,7 @@ async function validateExpression(diagnostics, token, allowedContext, contextPro
|
|
|
27520
27667
|
diagnostics.push({
|
|
27521
27668
|
message: "Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?",
|
|
27522
27669
|
range: mapRange(token.range),
|
|
27523
|
-
severity:
|
|
27670
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Error,
|
|
27524
27671
|
code: "expression-literal-text-in-condition"
|
|
27525
27672
|
});
|
|
27526
27673
|
}
|
|
@@ -27543,14 +27690,14 @@ async function validateExpression(diagnostics, token, allowedContext, contextPro
|
|
|
27543
27690
|
diagnostics.push({
|
|
27544
27691
|
message: `Invalid format string: ${formatError.message}`,
|
|
27545
27692
|
range: mapRange(expression.range),
|
|
27546
|
-
severity:
|
|
27693
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Error,
|
|
27547
27694
|
code: "invalid-format-string"
|
|
27548
27695
|
});
|
|
27549
27696
|
} else if (formatError.type === "arg-count-mismatch") {
|
|
27550
27697
|
diagnostics.push({
|
|
27551
27698
|
message: `Format string references argument {${formatError.expected - 1}} but only ${formatError.provided} argument(s) provided`,
|
|
27552
27699
|
range: mapRange(expression.range),
|
|
27553
|
-
severity:
|
|
27700
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Error,
|
|
27554
27701
|
code: "format-arg-count-mismatch"
|
|
27555
27702
|
});
|
|
27556
27703
|
}
|
|
@@ -27561,7 +27708,7 @@ async function validateExpression(diagnostics, token, allowedContext, contextPro
|
|
|
27561
27708
|
diagnostics.push(...e.errors.map((e2) => ({
|
|
27562
27709
|
message: e2.message,
|
|
27563
27710
|
range: mapRange(expression.range),
|
|
27564
|
-
severity: e2.severity === "error" ?
|
|
27711
|
+
severity: e2.severity === "error" ? import_vscode_languageserver_types7.DiagnosticSeverity.Error : import_vscode_languageserver_types7.DiagnosticSeverity.Warning
|
|
27565
27712
|
})));
|
|
27566
27713
|
}
|
|
27567
27714
|
}
|
|
@@ -27583,14 +27730,14 @@ function validateConcurrencyDeadlock(diagnostics, template) {
|
|
|
27583
27730
|
diagnostics.push({
|
|
27584
27731
|
message: `Concurrency group '${workflowGroup.value}' is also used by job '${job.id.value}'. This will cause a deadlock.`,
|
|
27585
27732
|
range: mapRange(template.concurrency.range),
|
|
27586
|
-
severity:
|
|
27733
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Error
|
|
27587
27734
|
});
|
|
27588
27735
|
}
|
|
27589
27736
|
if (job.concurrency.range) {
|
|
27590
27737
|
diagnostics.push({
|
|
27591
27738
|
message: `Concurrency group '${jobGroup.value}' is also defined at the workflow level. This will cause a deadlock.`,
|
|
27592
27739
|
range: mapRange(job.concurrency.range),
|
|
27593
|
-
severity:
|
|
27740
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Error
|
|
27594
27741
|
});
|
|
27595
27742
|
}
|
|
27596
27743
|
}
|
|
@@ -27655,13 +27802,13 @@ function validateBlockScalarChomping(diagnostics, token, parent, key, ancestors)
|
|
|
27655
27802
|
diagnostics.push({
|
|
27656
27803
|
message: `Block scalar '${blockIndicator}' implicitly adds a trailing newline that may be unintentional. Use '${blockIndicator}-' to remove it, or '${blockIndicator}+' to explicitly keep it.`,
|
|
27657
27804
|
range: mapRange(token.range),
|
|
27658
|
-
severity:
|
|
27805
|
+
severity: import_vscode_languageserver_types7.DiagnosticSeverity.Warning,
|
|
27659
27806
|
code: "block-scalar-chomping"
|
|
27660
27807
|
});
|
|
27661
27808
|
}
|
|
27662
27809
|
|
|
27663
27810
|
// ../languageservice/dist/code-actions/code-actions.js
|
|
27664
|
-
var
|
|
27811
|
+
var import_vscode_languageserver_types8 = __toESM(require_main2(), 1);
|
|
27665
27812
|
|
|
27666
27813
|
// ../languageservice/dist/code-actions/quickfix/add-missing-inputs.js
|
|
27667
27814
|
var addMissingInputsProvider = {
|
|
@@ -27830,7 +27977,7 @@ function getCodeActions(params) {
|
|
|
27830
27977
|
featureFlags: params.featureFlags
|
|
27831
27978
|
};
|
|
27832
27979
|
const providersByKind = /* @__PURE__ */ new Map([
|
|
27833
|
-
[
|
|
27980
|
+
[import_vscode_languageserver_types8.CodeActionKind.QuickFix, getQuickfixProviders(params.featureFlags)]
|
|
27834
27981
|
// [CodeActionKind.Refactor, getRefactorProviders(params.featureFlags)],
|
|
27835
27982
|
// [CodeActionKind.Source, getSourceProviders(params.featureFlags)],
|
|
27836
27983
|
// etc
|