From 4624b6ee62744ca391d05d29c1f4bee1f7e1e941 Mon Sep 17 00:00:00 2001 From: Vibhu Agarwal Date: Wed, 4 Mar 2020 19:31:12 +0530 Subject: [PATCH 01/61] Update python-publish.yml --- ci/python-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/python-publish.yml b/ci/python-publish.yml index d5f3859..a7438ff 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -22,6 +22,7 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel twine + pip install -r requirements.txt - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From 9b42288206b387b1b6d78ae4156efbde99bdf882 Mon Sep 17 00:00:00 2001 From: Vibhu Agarwal Date: Tue, 26 May 2020 17:52:59 +0530 Subject: [PATCH 02/61] Update python-publish.yml --- ci/python-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/python-publish.yml b/ci/python-publish.yml index a7438ff..736fae8 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -22,7 +22,7 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel twine - pip install -r requirements.txt + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} From af32ab05c611fe486ba27bf7fc52c0a307212fac Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Wed, 3 Jun 2020 23:16:28 +0200 Subject: [PATCH 03/61] Improve maven.yml --- ci/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/maven.yml b/ci/maven.yml index c8aeb3a..86f7309 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -21,4 +21,4 @@ jobs: with: java-version: 1.8 - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn --batch-mode --update-snapshots verify From 1de1e6c7776ea1f5be322861138d9954b833ff1a Mon Sep 17 00:00:00 2001 From: Kanitkorn Sujautra Date: Sun, 7 Jun 2020 00:51:49 +0900 Subject: [PATCH 04/61] Make NPM_TOKEN consistent with GITHUB_TOKEN It was `npm_token` before, but for GitHub it's `GITHUB_TOKEN`. This makes them be the same, all-cap case. --- ci/npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index 861e372..aa47c4e 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -30,7 +30,7 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} publish-gpr: needs: build From 194e973f907b13ca11a6f211d6dc4257a12a2619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 8 Jul 2020 15:19:01 +0200 Subject: [PATCH 05/61] ci: add Nix action --- ci/nix.yml | 25 ++ ci/properties/nix.properties.json | 6 + icons/nix.svg | 513 ++++++++++++++++++++++++++++++ 3 files changed, 544 insertions(+) create mode 100644 ci/nix.yml create mode 100644 ci/properties/nix.properties.json create mode 100644 icons/nix.svg diff --git a/ci/nix.yml b/ci/nix.yml new file mode 100644 index 0000000..e5213e0 --- /dev/null +++ b/ci/nix.yml @@ -0,0 +1,25 @@ +name: Nix + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.1 + - name: Install Nix + uses: cachix/install-nix-action@v10 + - name: Install Cachix + - uses: cachix/cachix-action@v6 + with: + # Once you generate a binary cache on https://app.cachix.org, you'll need to insert the name of the cache here + name: mycache + signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' + - name: Run nix-build + run: nix-build + - name: Check nix-shell works + run: nix-shell --run "echo OK" \ No newline at end of file diff --git a/ci/properties/nix.properties.json b/ci/properties/nix.properties.json new file mode 100644 index 0000000..3a90d75 --- /dev/null +++ b/ci/properties/nix.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Nix", + "description": "Build Nix project", + "iconName": "nix", + "categories": ["Nix"] +} diff --git a/icons/nix.svg b/icons/nix.svg new file mode 100644 index 0000000..9a70a14 --- /dev/null +++ b/icons/nix.svg @@ -0,0 +1,513 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + From 349e3dde9514886ed5acdac5c7636a47cbfd70dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Thu, 24 Sep 2020 11:57:59 +0200 Subject: [PATCH 06/61] nix: review feedback --- ci/nix.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ci/nix.yml b/ci/nix.yml index e5213e0..b42fe3e 100644 --- a/ci/nix.yml +++ b/ci/nix.yml @@ -1,3 +1,7 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. name: Nix on: @@ -12,9 +16,9 @@ jobs: steps: - uses: actions/checkout@v2.3.1 - name: Install Nix - uses: cachix/install-nix-action@v10 + uses: cachix/install-nix-action@95a8068e317b8def9482980abe762f36c77ccc99 - name: Install Cachix - - uses: cachix/cachix-action@v6 + - uses: cachix/cachix-action@490a246fbc7f92208d309eeb54383a4d828cedc1 with: # Once you generate a binary cache on https://app.cachix.org, you'll need to insert the name of the cache here name: mycache From 459c27dca6dbcf59f6a611e638005f470c1c8b6d Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Thu, 17 Jun 2021 14:28:48 +0530 Subject: [PATCH 07/61] workflow schema validation --- script/validate-data/index.ts | 53 +- script/validate-data/workflow-schema.json | 1110 +++++++++++++++++++++ 2 files changed, 1145 insertions(+), 18 deletions(-) create mode 100644 script/validate-data/workflow-schema.json diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index 81048f8..857a149 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -38,7 +38,6 @@ const propertiesSchema = { }, } } - async function checkWorkflows(folders: string[]): Promise { const result: WorkflowWithErrors[] = [] @@ -65,6 +64,29 @@ async function checkWorkflows(folders: string[]): Promise return result; } +async function validateWorkflowProperties(propertiesPath: string) : Promise { + try { + let errors = [] + const propertiesFileContent = await fs.readFile(propertiesPath, "utf8") + const properties: WorkflowProperties = JSON.parse(propertiesFileContent) + + let v = new validator(); + const res = v.validate(properties, propertiesSchema) + errors = res.errors.map(e => e.toString()) + if (properties.iconName && !properties.iconName.startsWith("octicon")) { + try { + await fs.access(`../../icons/${properties.iconName}.svg`) + } catch (e) { + errors.push(`No icon named ${properties.iconName} found`) + } + } + return errors + } + catch (e) { + throw e + } +} + async function checkWorkflow(workflowPath: string, propertiesPath: string): Promise { let workflowErrors: WorkflowWithErrors = { id: workflowPath, @@ -72,23 +94,18 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom } try { + workflowErrors.errors = await validateWorkflowProperties(propertiesPath) + const workflowFileContent = await fs.readFile(workflowPath, "utf8"); - safeLoad(workflowFileContent); // Validate yaml parses without error - - const propertiesFileContent = await fs.readFile(propertiesPath, "utf8") - const properties: WorkflowProperties = JSON.parse(propertiesFileContent) - - let v = new validator(); - const res = v.validate(properties, propertiesSchema) - workflowErrors.errors = res.errors.map(e => e.toString()) - - if (properties.iconName && !properties.iconName.startsWith("octicon")) { - try { - await fs.access(`../../icons/${properties.iconName}.svg`) - } catch (e) { - workflowErrors.errors.push(`No icon named ${properties.iconName} found`) - } - } + const workflow = safeLoad(workflowFileContent); // Validate yaml parses without error + + let workflowValidator = new validator(); + const workflowSchema = require("./workflow-schema.json"); + + const workflowValidationResult = workflowValidator.validate(workflow, workflowSchema) + const workflowValidationErrors = workflowValidationResult.errors.map(e => e.toString()) + workflowErrors.errors = workflowErrors.errors.concat(workflowValidationErrors) + } catch (e) { workflowErrors.errors.push(e.toString()) } @@ -116,4 +133,4 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom error(`Unhandled error while syncing workflows: ${e}`); setFailed(`Unhandled error`) } -})(); +})(); \ No newline at end of file diff --git a/script/validate-data/workflow-schema.json b/script/validate-data/workflow-schema.json new file mode 100644 index 0000000..39340f6 --- /dev/null +++ b/script/validate-data/workflow-schema.json @@ -0,0 +1,1110 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions", + "definitions": { + "architecture": { + "type": "string", + "enum": ["ARM32", "x64", "x86"] + }, + "branch": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestbranchestags", + "$ref": "#/definitions/globs", + "description": "When using the push and pull_request events, you can configure a workflow to run on specific branches or tags. If you only define only tags or only branches, the workflow won't run for events affecting the undefined Git ref.\nThe branches, branches-ignore, tags, and tags-ignore keywords accept glob patterns that use the * and ** wildcard characters to match more than one branch or tag name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nThe patterns defined in branches and tags are evaluated against the Git ref's name. For example, defining the pattern mona/octocat in branches will match the refs/heads/mona/octocat Git ref. The pattern releases/** will match the refs/heads/releases/10 Git ref.\nYou can use two types of filters to prevent a workflow from running on pushes and pull requests to tags and branches:\n- branches or branches-ignore - You cannot use both the branches and branches-ignore filters for the same event in a workflow. Use the branches filter when you need to filter branches for positive matches and exclude branches. Use the branches-ignore filter when you only need to exclude branch names.\n- tags or tags-ignore - You cannot use both the tags and tags-ignore filters for the same event in a workflow. Use the tags filter when you need to filter tags for positive matches and exclude tags. Use the tags-ignore filter when you only need to exclude tag names.\nYou can exclude tags and branches using the ! character. The order that you define patterns matters.\n- A matching negative pattern (prefixed with !) after a positive match will exclude the Git ref.\n- A matching positive pattern after a negative match will include the Git ref again." + }, + "configuration": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/configuration" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/configuration" + }, + "additionalItems": false + } + ] + }, + "container": { + "type": "object", + "properties": { + "image": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerimage", + "description": "The Docker image to use as the container to run the action. The value can be the Docker Hub image name or a public docker registry name.", + "type": "string" + }, + "env": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerenv", + "$ref": "#/definitions/env", + "description": "Sets an array of environment variables in the container." + }, + "ports": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerports", + "description": "Sets an array of ports to expose on the container.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "additionalItems": false + }, + "volumes": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes", + "description": "Sets 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.\nTo specify a volume, you specify the source and destination path: :\nThe is a volume name or an absolute path on the host machine, and is an absolute path in the container.", + "type": "array", + "items": { + "type": "string", + "pattern": "^[^:]+:[^:]+$" + }, + "minItems": 1, + "additionalItems": false + }, + "options": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontaineroptions", + "description": "Additional Docker container resource options. For a list of options, see https://docs.docker.com/engine/reference/commandline/create/#options.", + "type": "string" + } + }, + "required": ["image"], + "additionalProperties": false + }, + "defaults": { + "type": "object", + "properties": { + "run": { + "type": "object", + "properties": { + "shell": { + "$ref": "#/definitions/shell" + }, + "working-directory": { + "$ref": "#/definitions/working-directory" + } + }, + "minProperties": 1, + "additionalProperties": false + } + }, + "minProperties": 1, + "additionalProperties": false + }, + "env": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "minProperties": 1 + }, + "environment": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "name": {"type": "string"}, + "url": {"type": "string"} + } + } + ] + }, + "event": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows", + "type": "string", + "enum": [ + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "fork", + "gollum", + "issue_comment", + "issues", + "label", + "member", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "status", + "watch", + "repository_dispatch" + ] + }, + "eventObject": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "additionalProperties": true + }, + "globs": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "additionalItems": false + }, + "machine": { + "type": "string", + "enum": ["linux", "macos", "windows"] + }, + "name": { + "type": "string", + "pattern": "^[_a-zA-Z][a-zA-Z0-9_-]*$" + }, + "gitpermissionenums": { + "type": "string", + "enum": [ + "read", + "write", + "none" + ] + }, + "gitpermissions": { + "type": "object", + "properties": { + "actions" : { + "$ref": "#/definitions/gitpermissionenums" + }, + "checks" : { + "$ref": "#/definitions/gitpermissionenums" + }, + "contents": { + "$ref": "#/definitions/gitpermissionenums" + }, + "deployments": { + "$ref": "#/definitions/gitpermissionenums" + }, + "issues": { + "$ref": "#/definitions/gitpermissionenums" + }, + "packages": { + "$ref": "#/definitions/gitpermissionenums" + }, + "pull-requests": { + "$ref": "#/definitions/gitpermissionenums" + }, + "repository-projects": { + "$ref": "#/definitions/gitpermissionenums" + }, + "security-events": { + "$ref": "#/definitions/gitpermissionenums" + }, + "statuses": { + "$ref": "#/definitions/gitpermissionenums" + } + } + }, + "path": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths", + "$ref": "#/definitions/globs", + "description": "When using the push and pull_request events, you can configure a workflow to run when at least one file does not match paths-ignore or at least one modified file matches the configured paths. Path filters are not evaluated for pushes to tags.\nThe paths-ignore and paths keywords accept glob patterns that use the * and ** wildcard characters to match more than one path name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nYou can exclude paths using two types of filters. You cannot use both of these filters for the same event in a workflow.\n- paths-ignore - Use the paths-ignore filter when you only need to exclude path names.\n- paths - Use the paths filter when you need to filter paths for positive matches and exclude paths." + }, + "ref": { + "properties": { + "branches": { + "$ref": "#/definitions/branch" + }, + "branches-ignore": { + "$ref": "#/definitions/branch" + }, + "tags": { + "$ref": "#/definitions/branch" + }, + "tags-ignore": { + "$ref": "#/definitions/branch" + }, + "paths": { + "$ref": "#/definitions/path" + }, + "paths-ignore": { + "$ref": "#/definitions/path" + } + }, + "oneOf": [ + { + "type": "object", + "allOf": [ + { + "not": { + "required": ["branches", "branches-ignore"] + } + }, + { + "not": { + "required": ["tags", "tags-ignore"] + } + }, + { + "not": { + "required": ["paths", "paths-ignore"] + } + } + ] + }, + { + "type": "null" + } + ] + }, + "shell": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell", + "description": "You can override the default shell settings in the runner's operating system using the shell keyword. You can use built-in shell keywords, or you can define a custom set of shell options.", + "type": "string", + "anyOf": [ + { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#custom-shell" + }, + { + "enum": ["bash", "pwsh", "python", "sh", "cmd", "powershell"] + } + ] + }, + "types": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onevent_nametypes", + "description": "Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.\nYou can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.", + "type": "array", + "minItems": 1, + "additionalItems": false + }, + "working-directory": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun", + "description": "Using the working-directory keyword, you can specify the working directory of where to run the command.", + "type": "string" + } + }, + "properties": { + "name": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#name", + "description": "The name of your workflow. GitHub displays the names of your workflows on your repository's actions page. If you omit this field, GitHub sets the name to the workflow's filename.", + "type": "string" + }, + "on": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#on", + "description": "The name of the GitHub event that triggers the workflow. You can provide a single event 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. For a list of available events, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows.", + "oneOf": [ + { + "$ref": "#/definitions/event" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/event" + }, + "minItems": 1, + "additionalItems": false + }, + { + "type": "object", + "properties": { + "check_run": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-run-event-check_run", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the check_run event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/runs.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ + "created", + "rerequested", + "completed", + "requested_action" + ] + }, + "default": [ + "created", + "rerequested", + "completed", + "requested_action" + ] + } + } + }, + "check_suite": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-suite-event-check_suite", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the check_suite event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/suites/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["completed", "requested", "rerequested"] + }, + "default": ["completed", "requested", "rerequested"] + } + } + }, + "create": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#create-event-create", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone creates a branch or tag, which triggers the create event. For information about the REST API, see https://developer.github.com/v3/git/refs/#create-a-reference." + }, + "delete": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#delete-event-delete", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone deletes a branch or tag, which triggers the delete event. For information about the REST API, see https://developer.github.com/v3/git/refs/#delete-a-reference." + }, + "deployment": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-event-deployment", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone creates a deployment, which triggers the deployment event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/." + }, + "deployment_status": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-status-event-deployment_status", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime a third party provides a deployment status, which triggers the deployment_status event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status." + }, + "fork": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#fork-event-fork", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime when someone forks a repository, which triggers the fork event. For information about the REST API, see https://developer.github.com/v3/repos/forks/#create-a-fork." + }, + "gollum": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#gollum-event-gollum", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow when someone creates or updates a Wiki page, which triggers the gollum event." + }, + "issue_comment": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issue-comment-event-issue_comment", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the issue_comment event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/comments/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "edited", "deleted"] + }, + "default": ["created", "edited", "deleted"] + } + } + }, + "issues": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issues-event-issues", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the issues event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ + "opened", + "edited", + "deleted", + "transferred", + "pinned", + "unpinned", + "closed", + "reopened", + "assigned", + "unassigned", + "labeled", + "unlabeled", + "locked", + "unlocked", + "milestoned", + "demilestoned" + ] + }, + "default": [ + "opened", + "edited", + "deleted", + "transferred", + "pinned", + "unpinned", + "closed", + "reopened", + "assigned", + "unassigned", + "labeled", + "unlabeled", + "locked", + "unlocked", + "milestoned", + "demilestoned" + ] + } + } + }, + "label": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#label-event-label", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the label event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/labels/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "edited", "deleted"] + }, + "default": ["created", "edited", "deleted"] + } + } + }, + "member": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#member-event-member", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the member event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/collaborators/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["added", "edited", "deleted"] + }, + "default": ["added", "edited", "deleted"] + } + } + }, + "milestone": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#milestone-event-milestone", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the milestone event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/milestones/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "closed", "opened", "edited", "deleted"] + }, + "default": [ + "created", + "closed", + "opened", + "edited", + "deleted" + ] + } + } + }, + "page_build": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#page-build-event-page_build", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone pushes to a GitHub Pages-enabled branch, which triggers the page_build event. For information about the REST API, see https://developer.github.com/v3/repos/pages/." + }, + "project": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-event-project", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the project event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ + "created", + "updated", + "closed", + "reopened", + "edited", + "deleted" + ] + }, + "default": [ + "created", + "updated", + "closed", + "reopened", + "edited", + "deleted" + ] + } + } + }, + "project_card": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-card-event-project_card", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the project_card event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/cards.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ + "created", + "moved", + "converted", + "edited", + "deleted" + ] + }, + "default": [ + "created", + "moved", + "converted", + "edited", + "deleted" + ] + } + } + }, + "project_column": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-column-event-project_column", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the project_column event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/columns.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "updated", "moved", "deleted"] + }, + "default": ["created", "updated", "moved", "deleted"] + } + } + }, + "public": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#public-event-public", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone makes a private repository public, which triggers the public event. For information about the REST API, see https://developer.github.com/v3/repos/#edit." + }, + "pull_request": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-event-pull_request", + "$ref": "#/definitions/ref", + "description": "Runs your workflow anytime the pull_request event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ + "assigned", + "unassigned", + "labeled", + "unlabeled", + "opened", + "edited", + "closed", + "reopened", + "synchronize", + "ready_for_review", + "locked", + "unlocked", + "review_requested", + "review_request_removed" + ] + }, + "default": ["opened", "synchronize", "reopened"] + } + }, + "patternProperties": { + "^(branche|tag|path)s(-ignore)?$": { + "type": "array" + } + }, + "additionalProperties": false + }, + "pull_request_review": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-event-pull_request_review", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the pull_request_review event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/reviews.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["submitted", "edited", "dismissed"] + }, + "default": ["submitted", "edited", "dismissed"] + } + } + }, + "pull_request_review_comment": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-comment-event-pull_request_review_comment", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the pull_request_review_comment event. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/comments.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "edited", "deleted"] + }, + "default": ["created", "edited", "deleted"] + } + } + }, + "push": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#push-event-push", + "description": "Runs your workflow when someone pushes to a repository branch, which triggers the push event.\nNote: The webhook payload available to GitHub Actions does not include the added, removed, and modified attributes in the commit object. You can retrieve the full commit object using the REST API. For more information, see https://developer.github.com/v3/repos/commits/#get-a-single-commit.", + "type": "object", + "$ref": "#/definitions/ref", + "patternProperties": { + "^(branche|tag|path)s(-ignore)?$": { + "type": "array", + "items" : { + "type" : "string" + } + } + }, + "additionalProperties": false + }, + "release": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#release-event-release", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the release event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/releases/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ + "published", + "unpublished", + "created", + "edited", + "deleted", + "prereleased", + "released" + ] + }, + "default": [ + "published", + "unpublished", + "created", + "edited", + "deleted", + "prereleased", + "released" + ] + } + } + }, + "status": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#status-event-status", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the status of a Git commit changes, which triggers the status event. For information about the REST API, see https://developer.github.com/v3/repos/statuses/." + }, + "watch": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#watch-event-watch", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the watch event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/activity/starring/." + }, + "repository_dispatch": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#external-events-repository_dispatch", + "$ref": "#/definitions/eventObject", + "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. For more information, see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event.\nTo trigger the custom repository_dispatch webhook event, you must send a POST request to a GitHub API endpoint and provide an event_type name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the repository_dispatch event." + }, + "schedule": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule", + "description": "You can schedule a workflow to run at specific UTC times using POSIX cron syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). 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.\nNote: GitHub Actions does not support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly, and @reboot.\nYou can use crontab guru (https://crontab.guru/). to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of crontab guru examples (https://crontab.guru/examples.html).", + "type": "array", + "items": { + "type": "object", + "properties": { + "cron": { + "$comment": "https://stackoverflow.com/a/57639657/4044345", + "oneOf": [ + { + "pattern": "cron-(.)+" + }, + { + "type": "string", + "pattern": "^(((\\d+,)+\\d+|((\\d+|\\*)\\/\\d+)|(\\d+-\\d+)|\\d+|\\*) ?){5,7}$" + } + ] + } + }, + "additionalProperties": false + }, + "minItems": 1, + "additionalItems": false + } + }, + "additionalProperties": false + } + ] + }, + "env": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env", + "$ref": "#/definitions/env", + "description": "A map of environment variables that are available to all jobs and steps in the workflow." + }, + "defaults": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaults", + "$ref": "#/definitions/defaults", + "description": "A map of default settings that will apply to all jobs in the workflow." + }, + "jobs": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobs", + "description": "A workflow run is made up of one or more jobs. Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the jobs..needs keyword.\nEach job runs in a fresh instance of the virtual environment specified by runs-on.\nYou can run an unlimited number of jobs as long as you are within the workflow usage limits. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#usage-limits.", + "type": "object", + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_id", + "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 with a string that is unique to the jobs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", + "type": "object", + "properties": { + "name": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idname", + "description": "The name of the job displayed on GitHub.", + "type": "string" + }, + "needs": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idneeds", + "description": "Identifies 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 statement that causes the job to continue.", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/name" + }, + "minItems": 1, + "additionalItems": false + }, + { + "$ref": "#/definitions/name" + } + ] + }, + "permissions" : { + "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idpermissions", + "description": "You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access", + "oneOf": [ + { + "const": "read-all|write-all" + }, + { + "type" : "object", + "$ref": "#/definitions/gitpermissions" + } + ] + }, + "runs-on": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on", + "description": "The type of machine to run the job on. The machine can be either a GitHub-hosted runner, or a self-hosted runner.", + "oneOf": [ + { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#github-hosted-runners", + "type": "string", + "enum": [ + "${{ matrix.os }}", + "macos-latest", + "macos-10.15", + "self-hosted", + "ubuntu-16.04", + "ubuntu-18.04", + "ubuntu-latest", + "windows-latest", + "windows-2019" + ] + }, + { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#self-hosted-runners", + "type": "array", + "oneOf": [ + { + "items": [ + { + "const": "self-hosted" + } + ] + }, + { + "items": [ + { + "const": "self-hosted" + }, + { + "$ref": "#/definitions/machine" + } + ] + }, + { + "items": [ + { + "const": "self-hosted" + }, + { + "$ref": "#/definitions/architecture" + } + ] + }, + { + "items": [ + { + "const": "self-hosted" + }, + { + "$ref": "#/definitions/machine" + }, + { + "$ref": "#/definitions/architecture" + } + ] + }, + { + "items": [ + { + "const": "self-hosted" + }, + { + "$ref": "#/definitions/architecture" + }, + { + "$ref": "#/definitions/machine" + } + ] + } + ], + "additionalItems": false + } + ] + }, + "outputs": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjobs_idoutputs", + "description": "A map of outputs for a job. Job outputs are available to all downstream jobs that depend on this job.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "minProperties": 1 + }, + "environment": { + "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idenvironment", + "$ref": "#/definitions/environment", + "description": "The environment that the job references" + }, + "env": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idenv", + "$ref": "#/definitions/env", + "description": "A map of environment variables that are available to all steps in the job." + }, + "defaults": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaults", + "$ref": "#/definitions/defaults", + "description": "A map of default settings that will apply to all steps in the job." + }, + "if": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idif", + "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", + "type": "string" + }, + "steps": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps", + "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 virtual 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.\n", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid", + "description": "A unique identifier for the step. You can use the id to reference the step in contexts. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", + "type": "string" + }, + "if": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsif", + "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", + "type": "string" + }, + "name": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsname", + "description": "A name for your step to display on GitHub.", + "type": "string" + }, + "uses": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsuses", + "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 (https://hub.docker.com/).\nWe strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker tag number. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.\n- Using the commit SHA of a released action version is the safest for stability and security.\n- Using the specific major action version allows you to receive critical fixes and security patches while still maintaining compatibility. It also assures that your workflow should still work.\n- Using the master branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.\nSome actions require inputs that you must set using the with keyword. Review the action's README file to determine the inputs required.\nActions are either JavaScript files or Docker containers. If the action you're using is a Docker container you must run the job in a Linux virtual environment. For more details, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", + "type": "string" + }, + "run": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsrun", + "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.\nCommands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. For more information, see https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell.\nEach 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.", + "type": "string" + }, + "working-directory": { + "$ref": "#/definitions/working-directory" + }, + "shell": { + "$ref": "#/definitions/shell" + }, + "with": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswith", + "$ref": "#/definitions/env", + "description": "A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as environment variables. The variable is prefixed with INPUT_ and converted to upper case.", + "properties": { + "args": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithargs", + "type": "string" + }, + "entrypoint": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithentrypoint", + "type": "string" + } + } + }, + "env": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv", + "$ref": "#/definitions/env", + "description": "Sets environment variables for steps to use in the virtual environment. You can also set environment variables for the entire workflow or a job." + }, + "continue-on-error": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error", + "description": "Prevents a job from failing when a step fails. Set to true to allow a job to pass when this step fails.", + "type": "boolean", + "default": false + }, + "timeout-minutes": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes", + "description": "The maximum number of minutes to run the step before killing the process.", + "type": "number" + } + }, + "dependencies": { + "working-directory": ["run"], + "shell": ["run"] + }, + "additionalProperties": false + }, + "minItems": 1, + "additionalItems": false + }, + "timeout-minutes": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes", + "description": "The maximum number of minutes to let a workflow run before GitHub automatically cancels it. Default: 360", + "type": "number", + "default": 360 + }, + "strategy": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy", + "description": "A strategy creates a build matrix for your jobs. You can define different variations of an environment to run each job in.", + "type": "object", + "properties": { + "matrix": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix", + "description": "A build matrix is a set of different configurations of the virtual environment. For example you might run a job against more than one supported version of a language, operating system, or tool. Each configuration is a copy of the job that runs and reports a status.\nYou can specify a matrix by supplying an array for the configuration options. For example, if the GitHub virtual environment supports Node.js versions 6, 8, and 10 you could specify an array of those versions in the matrix.\nWhen you define a matrix of operating systems, you must set the required runs-on keyword to the operating system of the current job, rather than hard-coding the operating system name. To access the operating system name, you can use the matrix.os context parameter to set runs-on. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", + "type": "object", + "patternProperties": { + "^(in|ex)clude$": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/configuration" + } + }, + "minItems": 1, + "additionalItems": false + } + }, + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/configuration" + }, + "minItems": 1, + "additionalItems": false + }, + "minProperties": 1 + }, + "fail-fast": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast", + "description": "When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true", + "type": "boolean", + "default": true + }, + "max-parallel": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel", + "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 the available runners on GitHub-hosted virtual machines.", + "type": "number" + } + }, + "additionalProperties": false + }, + "continue-on-error": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error", + "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.", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + }, + "container": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainer", + "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.\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.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/container" + } + ] + } + }, + "services": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idservices", + "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.\nWhen 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.\nWhen 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.\nWhen a step does not use a container action, you must access the service using localhost and bind the ports.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/container" + } + } + }, + "required": ["runs-on", "steps"], + "additionalProperties": false + } + }, + "minProperties": 1, + "additionalProperties": false + } + }, + "required": ["on", "jobs"], + "additionalProperties": false + } \ No newline at end of file From 6daaf84bb339a571defa58852159d40c88d94f1c Mon Sep 17 00:00:00 2001 From: Zachary Conger Date: Thu, 17 Jun 2021 06:40:39 -0600 Subject: [PATCH 08/61] update everything to emphasize stackhawk not hawkscan --- .../properties/stackhawk.properties.json | 24 ++++++++ code-scanning/stackhawk.yml | 57 +++++++++++++++++++ icons/stackhawk.svg | 17 ++++++ 3 files changed, 98 insertions(+) create mode 100644 code-scanning/properties/stackhawk.properties.json create mode 100644 code-scanning/stackhawk.yml create mode 100644 icons/stackhawk.svg diff --git a/code-scanning/properties/stackhawk.properties.json b/code-scanning/properties/stackhawk.properties.json new file mode 100644 index 0000000..de29b7a --- /dev/null +++ b/code-scanning/properties/stackhawk.properties.json @@ -0,0 +1,24 @@ +{ + "name": "StackHawk", + "creator": "StackHawk", + "description": "Integrate dynamic application security testing (DAST) into your CI pipeline with StackHawk", + "iconName": "stackhawk", + "categories": [ + "Code Scanning", + "C", + "C#", + "C++", + "Go", + "Java", + "JavaScript", + "Kotlin", + "Objective C", + "PHP", + "Python", + "Ruby", + "Rust", + "Scala", + "Swift", + "TypeScript" + ] +} diff --git a/code-scanning/stackhawk.yml b/code-scanning/stackhawk.yml new file mode 100644 index 0000000..e445bb4 --- /dev/null +++ b/code-scanning/stackhawk.yml @@ -0,0 +1,57 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# 🦅 STACKHAWK https://stackhawk.com + +# The StackHawk HawkScan action makes it easy to integrate dynamic application security testing (DAST) into your +# CI pipeline. See the Getting Started guide (https://docs.stackhawk.com/hawkscan/) to get up and running with +# StackHawk quickly. + +# To use this workflow, you must: +# +# 1. Create an API Key and Application: Sign up for a free StackHawk account to obtain an API Key and +# create your first app and configuration file at https://app.stackhawk.com. +# +# 2. Save your API Key as a Secret: Save your API key as a GitHub Secret named HAWK_API_KEY. +# +# 3. Add your Config File: Add your stackhawk.yml configuration file to the base of your repository directory. +# +# 4. Set the Scan Failure Threshold: Add the hawk.failureThreshold configuration option +# (https://docs.stackhawk.com/hawkscan/configuration/#hawk) to your stackhawk.yml configuration file. If your scan +# produces alerts that meet or exceed the hawk.failureThreshold alert level, the scan will return exit code 42 +# and trigger a Code Scanning alert with a link to your scan results. +# +# 5. Update the "Start your service" Step: Update the "Start your service" step in the StackHawk workflow below to +# start your service so that it can be scanned with the "Run HawkScan" step. + + +name: "StackHawk" + +on: + push: + branches: [ $default-branch, $protected-branches ] + pull_request: + branches: [ $default-branch ] + schedule: + - cron: $cron-weekly + +jobs: + stackhawk: + name: StackHawk + runs-on: ubuntu-20.04 + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Start your service + run: ./your-service.sh & # ✏️ Update this to run your own service to be scanned + + - name: Run HawkScan + uses: stackhawk/hawkscan-action@v1.3.0 + continue-on-error: true # ✏️ Set to false to break your build on scan errors + with: + apiKey: ${{ secrets.HAWK_API_KEY }} + codeScanningAlerts: true + githubToken: ${{ github.token }} diff --git a/icons/stackhawk.svg b/icons/stackhawk.svg new file mode 100644 index 0000000..6b47520 --- /dev/null +++ b/icons/stackhawk.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + From 89dcaaf2de6868cec44894d7e15dae40c43bdd42 Mon Sep 17 00:00:00 2001 From: rui Date: Mon, 21 Jun 2021 13:29:17 -0400 Subject: [PATCH 09/61] npm-publish: update to use the latest TLS v14 node v12 is in maintenance mode node v16 (next TLS) is not ready yet --- ci/npm-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index 8462902..025976d 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 - run: npm ci - run: npm test @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm publish @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 registry-url: $registry-url(npm) - run: npm ci - run: npm publish From ba0243447c0c862c1e75245d03fa2f6b0a75c8a8 Mon Sep 17 00:00:00 2001 From: rui Date: Mon, 21 Jun 2021 13:32:13 -0400 Subject: [PATCH 10/61] pylint: use python 3.9 and setup-python@2 --- ci/pylint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/pylint.yml b/ci/pylint.yml index c16ba22..0805af7 100644 --- a/ci/pylint.yml +++ b/ci/pylint.yml @@ -9,10 +9,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip From aa1dc148f7524d8c4fd43530ff38fe5e223bc35d Mon Sep 17 00:00:00 2001 From: Aparna Ravindra <82894348+aparna-ravindra@users.noreply.github.com> Date: Thu, 24 Jun 2021 10:00:51 +0530 Subject: [PATCH 11/61] Create manual.yml --- .github/workflows/manual.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..3045613 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,18 @@ +name: Aparna Validate This +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2 + - name: Run validator + uses: aparna-ravindra/workflow-template-validator@v0.4 + with: + path-to-workflow-yaml: './ci,./automation' + path-to-properties-json: './ci/properties,./automation/properties' + path-to-icons: './icons' From ee8dc59f492b7e0964d95beb6fac208d54fee245 Mon Sep 17 00:00:00 2001 From: Aparna Ravindra <82894348+aparna-ravindra@users.noreply.github.com> Date: Thu, 24 Jun 2021 10:34:31 +0530 Subject: [PATCH 12/61] Create workflow_input.yml --- .github/workflows/workflow_input.yml | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/workflow_input.yml diff --git a/.github/workflows/workflow_input.yml b/.github/workflows/workflow_input.yml new file mode 100644 index 0000000..47f24e1 --- /dev/null +++ b/.github/workflows/workflow_input.yml @@ -0,0 +1,30 @@ +# This is a basic workflow that is manually triggered + +name: Manual workflow + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + name: + # Friendly description to be shown in the UI instead of 'name' + description: 'Person to greet' + # Default value if no value is explicitly provided + default: 'World' + # Input has to be provided for the workflow to run + required: true + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "greet" + greet: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Send greeting + run: echo "Hello ${{ github.event.inputs.name }}" From 3bb230a79aefd3eefa6b71545b43d0eef1b89b93 Mon Sep 17 00:00:00 2001 From: Ninad Kavimandan Date: Thu, 24 Jun 2021 10:51:42 +0530 Subject: [PATCH 13/61] added templates for gulp + grunt + webpack --- ci/grunt.yml | 27 ++++++++++++++++++++++++++ ci/gulp.yml | 27 ++++++++++++++++++++++++++ ci/properties/grunt.properties.json | 6 ++++++ ci/properties/gulp.properties.json | 6 ++++++ ci/properties/webpack.properties.json | 6 ++++++ ci/webpack.yml | 28 +++++++++++++++++++++++++++ 6 files changed, 100 insertions(+) create mode 100644 ci/grunt.yml create mode 100644 ci/gulp.yml create mode 100644 ci/properties/grunt.properties.json create mode 100644 ci/properties/gulp.properties.json create mode 100644 ci/properties/webpack.properties.json create mode 100644 ci/webpack.yml diff --git a/ci/grunt.yml b/ci/grunt.yml new file mode 100644 index 0000000..83464d1 --- /dev/null +++ b/ci/grunt.yml @@ -0,0 +1,27 @@ +name: Grunt CI + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: {{{ matrix.node-version }}} + + - name: npm install, build + run: | + npm install + grunt diff --git a/ci/gulp.yml b/ci/gulp.yml new file mode 100644 index 0000000..708f9b3 --- /dev/null +++ b/ci/gulp.yml @@ -0,0 +1,27 @@ +name: Gulp CI + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: {{{ matrix.node-version }}} + + - name: npm install, build + run: | + npm install + gulp diff --git a/ci/properties/grunt.properties.json b/ci/properties/grunt.properties.json new file mode 100644 index 0000000..b721ee4 --- /dev/null +++ b/ci/properties/grunt.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Grunt", + "description": "Build a Grunt project with npm.", + "iconName": "nodejs", + "categories": ["JavaScript", "npm", "Grunt"] +} diff --git a/ci/properties/gulp.properties.json b/ci/properties/gulp.properties.json new file mode 100644 index 0000000..9e5b02e --- /dev/null +++ b/ci/properties/gulp.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Gulp", + "description": "Build a Gulp project with npm.", + "iconName": "nodejs", + "categories": ["JavaScript", "npm", "Gulp"] +} diff --git a/ci/properties/webpack.properties.json b/ci/properties/webpack.properties.json new file mode 100644 index 0000000..4efd0b2 --- /dev/null +++ b/ci/properties/webpack.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Webpack", + "description": "Build a Webpack project with npm.", + "iconName": "nodejs", + "categories": ["JavaScript", "npm", "Webpack"] +} diff --git a/ci/webpack.yml b/ci/webpack.yml new file mode 100644 index 0000000..d79e907 --- /dev/null +++ b/ci/webpack.yml @@ -0,0 +1,28 @@ +name: Webpack CI + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + with: + node-version: {{{ matrix.node-version }}} + + - name: npm install, build + run: | + npm install -g webpack webpack-cli --save-dev + npm install + npx webpack From edd7400d76d8ff347b62a0c662070b5256564be1 Mon Sep 17 00:00:00 2001 From: Ninad Kavimandan Date: Thu, 24 Jun 2021 11:00:38 +0530 Subject: [PATCH 14/61] removed CI from the name --- ci/grunt.yml | 9 +++++---- ci/gulp.yml | 9 +++++---- ci/webpack.yml | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/ci/grunt.yml b/ci/grunt.yml index 83464d1..767e8fa 100644 --- a/ci/grunt.yml +++ b/ci/grunt.yml @@ -1,4 +1,4 @@ -name: Grunt CI +name: Grunt on: push: @@ -17,11 +17,12 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 with: - node-version: {{{ matrix.node-version }}} + node-version: ${{ matrix.node-version }} - - name: npm install, build + - name: Build run: | npm install grunt diff --git a/ci/gulp.yml b/ci/gulp.yml index 708f9b3..962d15f 100644 --- a/ci/gulp.yml +++ b/ci/gulp.yml @@ -1,4 +1,4 @@ -name: Gulp CI +name: Gulp on: push: @@ -17,11 +17,12 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 with: - node-version: {{{ matrix.node-version }}} + node-version: ${{ matrix.node-version }} - - name: npm install, build + - name: Build run: | npm install gulp diff --git a/ci/webpack.yml b/ci/webpack.yml index d79e907..eb85baf 100644 --- a/ci/webpack.yml +++ b/ci/webpack.yml @@ -1,4 +1,4 @@ -name: Webpack CI +name: Webpack on: push: @@ -17,11 +17,12 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 with: - node-version: {{{ matrix.node-version }}} + node-version: ${{ matrix.node-version }} - - name: npm install, build + - name: Build run: | npm install -g webpack webpack-cli --save-dev npm install From 2f86a8abbe1f5934105778258218f1dee8a9d002 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari <64764738+tiwarishub@users.noreply.github.com> Date: Thu, 24 Jun 2021 11:06:26 +0530 Subject: [PATCH 15/61] Update blank.properties.json --- ci/properties/blank.properties.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/properties/blank.properties.json b/ci/properties/blank.properties.json index d244772..35d77bc 100644 --- a/ci/properties/blank.properties.json +++ b/ci/properties/blank.properties.json @@ -1,6 +1,7 @@ { "name": "Simple workflow", "description": "Start with a file with the minimum necessary structure.", + "creator": "Github", "iconName": "blank", "categories": null } From acad7b662618966e7805c7ec0308901b1044f2f9 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari <64764738+tiwarishub@users.noreply.github.com> Date: Thu, 24 Jun 2021 21:40:31 +0530 Subject: [PATCH 16/61] Update ci/properties/blank.properties.json Co-authored-by: Andy McKay --- ci/properties/blank.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/blank.properties.json b/ci/properties/blank.properties.json index 35d77bc..610327f 100644 --- a/ci/properties/blank.properties.json +++ b/ci/properties/blank.properties.json @@ -1,7 +1,7 @@ { "name": "Simple workflow", "description": "Start with a file with the minimum necessary structure.", - "creator": "Github", + "creator": "GitHub", "iconName": "blank", "categories": null } From 808fc345148c564ae892021e80c9484bfb7da32c Mon Sep 17 00:00:00 2001 From: Yong Yan Date: Thu, 24 Jun 2021 15:54:15 -0700 Subject: [PATCH 17/61] Add flawfinder workflow --- code-scanning/flawfinder.yml | 38 +++++++++++++++++++ .../properties/flawfinder.properties.json | 7 ++++ 2 files changed, 45 insertions(+) create mode 100644 code-scanning/flawfinder.yml create mode 100644 code-scanning/properties/flawfinder.properties.json diff --git a/code-scanning/flawfinder.yml b/code-scanning/flawfinder.yml new file mode 100644 index 0000000..b057020 --- /dev/null +++ b/code-scanning/flawfinder.yml @@ -0,0 +1,38 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: flawfinder + +on: + push: + branches: [ $default-branch, $protected-branches ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ $default-branch ] + schedule: + - cron: $cron-weekly + +jobs: + flawfinder: + name: Flawfinder + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Run Flawfinder + uses: david-a-wheeler/flawfinder@v1.0 + with: + arguments: '--sarif ./' + output: 'flawfinder_results.sarif' + + - name: Upload analysis results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: flawfinder_results.sarif \ No newline at end of file diff --git a/code-scanning/properties/flawfinder.properties.json b/code-scanning/properties/flawfinder.properties.json new file mode 100644 index 0000000..f784d03 --- /dev/null +++ b/code-scanning/properties/flawfinder.properties.json @@ -0,0 +1,7 @@ +{ + "name": "Flawfinder", + "creator": "David A. Wheeler", + "description": "Flawfinder is a simple program that scans C/C++ source code and reports potential security flaws.", + "iconName": "flawfinder", + "categories": [ "Code Scanning", "C", "C++" ] +} \ No newline at end of file From 09bec32a030252712d21206d6db4c8cd244cbf25 Mon Sep 17 00:00:00 2001 From: Zachary Conger Date: Mon, 28 Jun 2021 16:05:58 -0600 Subject: [PATCH 18/61] update hawkscan-action reference to commit hash --- code-scanning/stackhawk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-scanning/stackhawk.yml b/code-scanning/stackhawk.yml index e445bb4..9701b1f 100644 --- a/code-scanning/stackhawk.yml +++ b/code-scanning/stackhawk.yml @@ -49,7 +49,7 @@ jobs: run: ./your-service.sh & # ✏️ Update this to run your own service to be scanned - name: Run HawkScan - uses: stackhawk/hawkscan-action@v1.3.0 + uses: stackhawk/hawkscan-action@4c3258cd62248dac6d9fe91dd8d45928c697dee0 continue-on-error: true # ✏️ Set to false to break your build on scan errors with: apiKey: ${{ secrets.HAWK_API_KEY }} From 1edda098150cf4876e9ebacc400dbf8e1122b035 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Wed, 30 Jun 2021 18:44:10 +0300 Subject: [PATCH 19/61] Add cache usage to the node.js starter-workflow --- ci/node.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/node.js.yml b/ci/node.js.yml index 2f60984..89b24fe 100644 --- a/ci/node.js.yml +++ b/ci/node.js.yml @@ -1,4 +1,4 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: Node.js CI @@ -25,6 +25,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: 'npm' - run: npm ci - run: npm run build --if-present - run: npm test From a72fa8fd8b1f0e4b9ea81194dfdc39d50c53613c Mon Sep 17 00:00:00 2001 From: Yong Yan Date: Wed, 30 Jun 2021 14:18:24 -0700 Subject: [PATCH 20/61] Add icon file --- code-scanning/flawfinder.yml | 2 +- icons/flawfinder.svg | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 icons/flawfinder.svg diff --git a/code-scanning/flawfinder.yml b/code-scanning/flawfinder.yml index b057020..17fcae1 100644 --- a/code-scanning/flawfinder.yml +++ b/code-scanning/flawfinder.yml @@ -35,4 +35,4 @@ jobs: - name: Upload analysis results to GitHub Security tab uses: github/codeql-action/upload-sarif@v1 with: - sarif_file: flawfinder_results.sarif \ No newline at end of file + sarif_file: ${{github.workspace}}/flawfinder_results.sarif \ No newline at end of file diff --git a/icons/flawfinder.svg b/icons/flawfinder.svg new file mode 100644 index 0000000..2324dca --- /dev/null +++ b/icons/flawfinder.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + From f6cef1d4ee78102ca76d6a82d329316be127edc7 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Fri, 16 Jul 2021 12:30:45 -0700 Subject: [PATCH 21/61] Update CODEOWNERS Move to a specific starter-workflow team. --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 3732a32..8866d17 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,3 +1,3 @@ -* @actions/actions-experience +* @actions/starter-workflows /code-scanning/ @actions/advanced-security-code-scanning From 55ff908b82fea8b82e0e5c4c8cd2f7f1c683c8dd Mon Sep 17 00:00:00 2001 From: Yong Yan Date: Mon, 19 Jul 2021 10:02:01 -0700 Subject: [PATCH 22/61] Update published action name and version --- code-scanning/flawfinder.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code-scanning/flawfinder.yml b/code-scanning/flawfinder.yml index 17fcae1..9479847 100644 --- a/code-scanning/flawfinder.yml +++ b/code-scanning/flawfinder.yml @@ -26,8 +26,8 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Run Flawfinder - uses: david-a-wheeler/flawfinder@v1.0 + - name: flawfinder_scan + uses: david-a-wheeler/flawfinder@2.0.19-alpha1 with: arguments: '--sarif ./' output: 'flawfinder_results.sarif' From 5175c338194a0e9a233f37ccdef824a8b5e5732c Mon Sep 17 00:00:00 2001 From: Ninad Kavimandan Date: Tue, 20 Jul 2021 10:19:59 +0530 Subject: [PATCH 23/61] updated icons for gulp + grunt + webpack ci --- ci/properties/grunt.properties.json | 2 +- ci/properties/gulp.properties.json | 2 +- ci/properties/webpack.properties.json | 2 +- ci/webpack.yml | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/properties/grunt.properties.json b/ci/properties/grunt.properties.json index b721ee4..bbda07f 100644 --- a/ci/properties/grunt.properties.json +++ b/ci/properties/grunt.properties.json @@ -1,6 +1,6 @@ { "name": "Grunt", "description": "Build a Grunt project with npm.", - "iconName": "nodejs", + "iconName": "grunt", "categories": ["JavaScript", "npm", "Grunt"] } diff --git a/ci/properties/gulp.properties.json b/ci/properties/gulp.properties.json index 9e5b02e..58304fe 100644 --- a/ci/properties/gulp.properties.json +++ b/ci/properties/gulp.properties.json @@ -1,6 +1,6 @@ { "name": "Gulp", "description": "Build a Gulp project with npm.", - "iconName": "nodejs", + "iconName": "gulp", "categories": ["JavaScript", "npm", "Gulp"] } diff --git a/ci/properties/webpack.properties.json b/ci/properties/webpack.properties.json index 4efd0b2..240393b 100644 --- a/ci/properties/webpack.properties.json +++ b/ci/properties/webpack.properties.json @@ -1,6 +1,6 @@ { "name": "Webpack", "description": "Build a Webpack project with npm.", - "iconName": "nodejs", + "iconName": "webpack", "categories": ["JavaScript", "npm", "Webpack"] } diff --git a/ci/webpack.yml b/ci/webpack.yml index eb85baf..5839a82 100644 --- a/ci/webpack.yml +++ b/ci/webpack.yml @@ -24,6 +24,5 @@ jobs: - name: Build run: | - npm install -g webpack webpack-cli --save-dev npm install npx webpack From e12559a4f839a7109e282761ed5421f8afbb9a38 Mon Sep 17 00:00:00 2001 From: Ninad Kavimandan Date: Tue, 20 Jul 2021 10:43:58 +0530 Subject: [PATCH 24/61] updated descriptions and workflow names --- ci/grunt.yml | 2 +- ci/gulp.yml | 2 +- ci/properties/grunt.properties.json | 2 +- ci/properties/gulp.properties.json | 2 +- ci/properties/webpack.properties.json | 2 +- ci/webpack.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/grunt.yml b/ci/grunt.yml index 767e8fa..8c83cb6 100644 --- a/ci/grunt.yml +++ b/ci/grunt.yml @@ -1,4 +1,4 @@ -name: Grunt +name: NodeJS with Grunt on: push: diff --git a/ci/gulp.yml b/ci/gulp.yml index 962d15f..cc5da13 100644 --- a/ci/gulp.yml +++ b/ci/gulp.yml @@ -1,4 +1,4 @@ -name: Gulp +name: NodeJS with Gulp on: push: diff --git a/ci/properties/grunt.properties.json b/ci/properties/grunt.properties.json index bbda07f..aac35f1 100644 --- a/ci/properties/grunt.properties.json +++ b/ci/properties/grunt.properties.json @@ -1,6 +1,6 @@ { "name": "Grunt", - "description": "Build a Grunt project with npm.", + "description": "Build a NodeJS project with npm and grunt.", "iconName": "grunt", "categories": ["JavaScript", "npm", "Grunt"] } diff --git a/ci/properties/gulp.properties.json b/ci/properties/gulp.properties.json index 58304fe..5eeabb7 100644 --- a/ci/properties/gulp.properties.json +++ b/ci/properties/gulp.properties.json @@ -1,6 +1,6 @@ { "name": "Gulp", - "description": "Build a Gulp project with npm.", + "description": "Build a NodeJS project with npm and gulp.", "iconName": "gulp", "categories": ["JavaScript", "npm", "Gulp"] } diff --git a/ci/properties/webpack.properties.json b/ci/properties/webpack.properties.json index 240393b..3f4e4aa 100644 --- a/ci/properties/webpack.properties.json +++ b/ci/properties/webpack.properties.json @@ -1,6 +1,6 @@ { "name": "Webpack", - "description": "Build a Webpack project with npm.", + "description": "Build a NodeJS project with npm and webpack.", "iconName": "webpack", "categories": ["JavaScript", "npm", "Webpack"] } diff --git a/ci/webpack.yml b/ci/webpack.yml index 5839a82..8edb34f 100644 --- a/ci/webpack.yml +++ b/ci/webpack.yml @@ -1,4 +1,4 @@ -name: Webpack +name: NodeJS with Webpack on: push: From 3e7eb56f2798bbcf2641285055071fa5db322f99 Mon Sep 17 00:00:00 2001 From: Ninad Kavimandan Date: Tue, 20 Jul 2021 13:30:46 +0530 Subject: [PATCH 25/61] added `TypeScript` for gulp + grunt + webpack --- ci/properties/grunt.properties.json | 2 +- ci/properties/gulp.properties.json | 2 +- ci/properties/webpack.properties.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/properties/grunt.properties.json b/ci/properties/grunt.properties.json index aac35f1..c8a5b9f 100644 --- a/ci/properties/grunt.properties.json +++ b/ci/properties/grunt.properties.json @@ -2,5 +2,5 @@ "name": "Grunt", "description": "Build a NodeJS project with npm and grunt.", "iconName": "grunt", - "categories": ["JavaScript", "npm", "Grunt"] + "categories": ["JavaScript", "TypeScript", "npm", "Grunt"] } diff --git a/ci/properties/gulp.properties.json b/ci/properties/gulp.properties.json index 5eeabb7..658325b 100644 --- a/ci/properties/gulp.properties.json +++ b/ci/properties/gulp.properties.json @@ -2,5 +2,5 @@ "name": "Gulp", "description": "Build a NodeJS project with npm and gulp.", "iconName": "gulp", - "categories": ["JavaScript", "npm", "Gulp"] + "categories": ["JavaScript", "TypeScript", "npm", "Gulp"] } diff --git a/ci/properties/webpack.properties.json b/ci/properties/webpack.properties.json index 3f4e4aa..1e22ccb 100644 --- a/ci/properties/webpack.properties.json +++ b/ci/properties/webpack.properties.json @@ -2,5 +2,5 @@ "name": "Webpack", "description": "Build a NodeJS project with npm and webpack.", "iconName": "webpack", - "categories": ["JavaScript", "npm", "Webpack"] + "categories": ["JavaScript", "TypeScript", "npm", "Webpack"] } From 4ae4e4dcb0f858b5390163bb9c052cf1fc7dbbe9 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Thu, 22 Jul 2021 15:29:31 +0530 Subject: [PATCH 26/61] workflow schema --- script/validate-data/workflow-schema.json | 2150 +++++++++++---------- 1 file changed, 1142 insertions(+), 1008 deletions(-) diff --git a/script/validate-data/workflow-schema.json b/script/validate-data/workflow-schema.json index 39340f6..b3e7b8c 100644 --- a/script/validate-data/workflow-schema.json +++ b/script/validate-data/workflow-schema.json @@ -1,17 +1,112 @@ { - "$schema": "http://json-schema.org/draft-07/schema", - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions", - "definitions": { - "architecture": { - "type": "string", - "enum": ["ARM32", "x64", "x86"] + "$schema": "http://json-schema.org/draft-07/schema", + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions", + "definitions": { + "architecture": { + "type": "string", + "enum": ["ARM32", "x64", "x86"] + }, + "branch": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestbranchestags", + "$ref": "#/definitions/globs", + "description": "When using the push and pull_request events, you can configure a workflow to run on specific branches or tags. If you only define only tags or only branches, the workflow won't run for events affecting the undefined Git ref.\nThe branches, branches-ignore, tags, and tags-ignore keywords accept glob patterns that use the * and ** wildcard characters to match more than one branch or tag name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nThe patterns defined in branches and tags are evaluated against the Git ref's name. For example, defining the pattern mona/octocat in branches will match the refs/heads/mona/octocat Git ref. The pattern releases/** will match the refs/heads/releases/10 Git ref.\nYou can use two types of filters to prevent a workflow from running on pushes and pull requests to tags and branches:\n- branches or branches-ignore - You cannot use both the branches and branches-ignore filters for the same event in a workflow. Use the branches filter when you need to filter branches for positive matches and exclude branches. Use the branches-ignore filter when you only need to exclude branch names.\n- tags or tags-ignore - You cannot use both the tags and tags-ignore filters for the same event in a workflow. Use the tags filter when you need to filter tags for positive matches and exclude tags. Use the tags-ignore filter when you only need to exclude tag names.\nYou can exclude tags and branches using the ! character. The order that you define patterns matters.\n- A matching negative pattern (prefixed with !) after a positive match will exclude the Git ref.\n- A matching positive pattern after a negative match will include the Git ref again." + }, + "configuration": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/configuration" + } + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/configuration" + }, + "additionalItems": false + } + ] + }, + "container": { + "type": "object", + "properties": { + "image": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerimage", + "description": "The Docker image to use as the container to run the action. The value can be the Docker Hub image name or a public docker registry name.", + "type": "string" + }, + "env": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerenv", + "$ref": "#/definitions/env", + "description": "Sets an array of environment variables in the container." + }, + "ports": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerports", + "description": "Sets an array of ports to expose on the container.", + "type": "array", + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "minItems": 1, + "additionalItems": false + }, + "volumes": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes", + "description": "Sets 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.\nTo specify a volume, you specify the source and destination path: :\nThe is a volume name or an absolute path on the host machine, and is an absolute path in the container.", + "type": "array", + "items": { + "type": "string", + "pattern": "^[^:]+:[^:]+$" + }, + "minItems": 1, + "additionalItems": false + }, + "options": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontaineroptions", + "description": "Additional Docker container resource options. For a list of options, see https://docs.docker.com/engine/reference/commandline/create/#options.", + "type": "string" + } }, - "branch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestbranchestags", - "$ref": "#/definitions/globs", - "description": "When using the push and pull_request events, you can configure a workflow to run on specific branches or tags. If you only define only tags or only branches, the workflow won't run for events affecting the undefined Git ref.\nThe branches, branches-ignore, tags, and tags-ignore keywords accept glob patterns that use the * and ** wildcard characters to match more than one branch or tag name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nThe patterns defined in branches and tags are evaluated against the Git ref's name. For example, defining the pattern mona/octocat in branches will match the refs/heads/mona/octocat Git ref. The pattern releases/** will match the refs/heads/releases/10 Git ref.\nYou can use two types of filters to prevent a workflow from running on pushes and pull requests to tags and branches:\n- branches or branches-ignore - You cannot use both the branches and branches-ignore filters for the same event in a workflow. Use the branches filter when you need to filter branches for positive matches and exclude branches. Use the branches-ignore filter when you only need to exclude branch names.\n- tags or tags-ignore - You cannot use both the tags and tags-ignore filters for the same event in a workflow. Use the tags filter when you need to filter tags for positive matches and exclude tags. Use the tags-ignore filter when you only need to exclude tag names.\nYou can exclude tags and branches using the ! character. The order that you define patterns matters.\n- A matching negative pattern (prefixed with !) after a positive match will exclude the Git ref.\n- A matching positive pattern after a negative match will include the Git ref again." + "required": ["image"], + "additionalProperties": false + }, + "defaults": { + "type": "object", + "properties": { + "run": { + "type": "object", + "properties": { + "shell": { + "$ref": "#/definitions/shell" + }, + "working-directory": { + "$ref": "#/definitions/working-directory" + } + }, + "minProperties": 1, + "additionalProperties": false + } }, - "configuration": { + "minProperties": 1, + "additionalProperties": false + }, + "env": { + "type": "object", + "additionalProperties": { "oneOf": [ { "type": "string" @@ -20,441 +115,329 @@ "type": "number" }, { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/configuration" - } - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/configuration" - }, - "additionalItems": false + "type": "boolean" } ] }, - "container": { - "type": "object", - "properties": { - "image": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerimage", - "description": "The Docker image to use as the container to run the action. The value can be the Docker Hub image name or a public docker registry name.", + "minProperties": 1 + }, + "environment": { + "oneOf": [ + { "type": "string" }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerenv", - "$ref": "#/definitions/env", - "description": "Sets an array of environment variables in the container." - }, - "ports": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerports", - "description": "Sets an array of ports to expose on the container.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 1, - "additionalItems": false - }, - "volumes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes", - "description": "Sets 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.\nTo specify a volume, you specify the source and destination path: :\nThe is a volume name or an absolute path on the host machine, and is an absolute path in the container.", - "type": "array", - "items": { - "type": "string", - "pattern": "^[^:]+:[^:]+$" - }, - "minItems": 1, - "additionalItems": false - }, - "options": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontaineroptions", - "description": "Additional Docker container resource options. For a list of options, see https://docs.docker.com/engine/reference/commandline/create/#options.", - "type": "string" - } - }, - "required": ["image"], - "additionalProperties": false - }, - "defaults": { - "type": "object", - "properties": { - "run": { + { "type": "object", "properties": { - "shell": { - "$ref": "#/definitions/shell" - }, - "working-directory": { - "$ref": "#/definitions/working-directory" - } - }, - "minProperties": 1, - "additionalProperties": false - } - }, - "minProperties": 1, - "additionalProperties": false - }, - "env": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" + "name": {"type": "string"}, + "url": {"type": "string"} } - ] - }, - "minProperties": 1 - }, - "environment": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "name": {"type": "string"}, - "url": {"type": "string"} - } - } - ] - }, - "event": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows", - "type": "string", - "enum": [ - "check_run", - "check_suite", - "create", - "delete", - "deployment", - "deployment_status", - "fork", - "gollum", - "issue_comment", - "issues", - "label", - "member", - "milestone", - "page_build", - "project", - "project_card", - "project_column", - "public", - "pull_request", - "pull_request_review", - "pull_request_review_comment", - "push", - "registry_package", - "release", - "status", - "watch", - "repository_dispatch" - ] - }, - "eventObject": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "additionalProperties": true - }, - "globs": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "minItems": 1, - "additionalItems": false - }, - "machine": { - "type": "string", - "enum": ["linux", "macos", "windows"] - }, - "name": { - "type": "string", - "pattern": "^[_a-zA-Z][a-zA-Z0-9_-]*$" - }, - "gitpermissionenums": { - "type": "string", - "enum": [ - "read", - "write", - "none" - ] - }, - "gitpermissions": { - "type": "object", - "properties": { - "actions" : { - "$ref": "#/definitions/gitpermissionenums" - }, - "checks" : { - "$ref": "#/definitions/gitpermissionenums" - }, - "contents": { - "$ref": "#/definitions/gitpermissionenums" - }, - "deployments": { - "$ref": "#/definitions/gitpermissionenums" - }, - "issues": { - "$ref": "#/definitions/gitpermissionenums" - }, - "packages": { - "$ref": "#/definitions/gitpermissionenums" - }, - "pull-requests": { - "$ref": "#/definitions/gitpermissionenums" - }, - "repository-projects": { - "$ref": "#/definitions/gitpermissionenums" - }, - "security-events": { - "$ref": "#/definitions/gitpermissionenums" - }, - "statuses": { - "$ref": "#/definitions/gitpermissionenums" - } - } - }, - "path": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths", - "$ref": "#/definitions/globs", - "description": "When using the push and pull_request events, you can configure a workflow to run when at least one file does not match paths-ignore or at least one modified file matches the configured paths. Path filters are not evaluated for pushes to tags.\nThe paths-ignore and paths keywords accept glob patterns that use the * and ** wildcard characters to match more than one path name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nYou can exclude paths using two types of filters. You cannot use both of these filters for the same event in a workflow.\n- paths-ignore - Use the paths-ignore filter when you only need to exclude path names.\n- paths - Use the paths filter when you need to filter paths for positive matches and exclude paths." - }, - "ref": { - "properties": { - "branches": { - "$ref": "#/definitions/branch" - }, - "branches-ignore": { - "$ref": "#/definitions/branch" - }, - "tags": { - "$ref": "#/definitions/branch" - }, - "tags-ignore": { - "$ref": "#/definitions/branch" - }, - "paths": { - "$ref": "#/definitions/path" - }, - "paths-ignore": { - "$ref": "#/definitions/path" - } - }, - "oneOf": [ - { - "type": "object", - "allOf": [ - { - "not": { - "required": ["branches", "branches-ignore"] - } - }, - { - "not": { - "required": ["tags", "tags-ignore"] - } - }, - { - "not": { - "required": ["paths", "paths-ignore"] - } - } - ] - }, - { - "type": "null" } ] - }, - "shell": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell", - "description": "You can override the default shell settings in the runner's operating system using the shell keyword. You can use built-in shell keywords, or you can define a custom set of shell options.", - "type": "string", - "anyOf": [ - { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#custom-shell" - }, - { - "enum": ["bash", "pwsh", "python", "sh", "cmd", "powershell"] - } - ] - }, - "types": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onevent_nametypes", - "description": "Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.\nYou can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.", - "type": "array", - "minItems": 1, - "additionalItems": false - }, - "working-directory": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun", - "description": "Using the working-directory keyword, you can specify the working directory of where to run the command.", - "type": "string" - } }, - "properties": { - "name": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#name", - "description": "The name of your workflow. GitHub displays the names of your workflows on your repository's actions page. If you omit this field, GitHub sets the name to the workflow's filename.", - "type": "string" + "event": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows", + "type": "string", + "enum": [ + "check_run", + "check_suite", + "create", + "delete", + "deployment", + "deployment_status", + "fork", + "gollum", + "issue_comment", + "issues", + "label", + "member", + "milestone", + "page_build", + "project", + "project_card", + "project_column", + "public", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "push", + "registry_package", + "release", + "status", + "watch", + "repository_dispatch", + "workflow_dispatch", + "workflow_run" + ] + }, + "eventObject": { + "oneOf": [ + { + "type": "object" + }, + { + "type": "null" + } + ], + "additionalProperties": true + }, + "globs": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 }, - "on": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#on", - "description": "The name of the GitHub event that triggers the workflow. You can provide a single event 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. For a list of available events, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows.", - "oneOf": [ - { + "minItems": 1, + "additionalItems": false + }, + "machine": { + "type": "string", + "enum": ["linux", "macos", "windows"] + }, + "name": { + "type": "string", + "pattern": "^[_a-zA-Z][a-zA-Z0-9_-]*$" + }, + "gitpermissionenums": { + "type": "string", + "enum": [ + "read", + "write", + "none" + ] + }, + "gitpermissions": { + "type": "object", + "properties": { + "actions" : { + "$ref": "#/definitions/gitpermissionenums" + }, + "checks" : { + "$ref": "#/definitions/gitpermissionenums" + }, + "contents": { + "$ref": "#/definitions/gitpermissionenums" + }, + "deployments": { + "$ref": "#/definitions/gitpermissionenums" + }, + "issues": { + "$ref": "#/definitions/gitpermissionenums" + }, + "packages": { + "$ref": "#/definitions/gitpermissionenums" + }, + "pull-requests": { + "$ref": "#/definitions/gitpermissionenums" + }, + "repository-projects": { + "$ref": "#/definitions/gitpermissionenums" + }, + "security-events": { + "$ref": "#/definitions/gitpermissionenums" + }, + "statuses": { + "$ref": "#/definitions/gitpermissionenums" + } + } + }, + "path": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths", + "$ref": "#/definitions/globs", + "description": "When using the push and pull_request events, you can configure a workflow to run when at least one file does not match paths-ignore or at least one modified file matches the configured paths. Path filters are not evaluated for pushes to tags.\nThe paths-ignore and paths keywords accept glob patterns that use the * and ** wildcard characters to match more than one path name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nYou can exclude paths using two types of filters. You cannot use both of these filters for the same event in a workflow.\n- paths-ignore - Use the paths-ignore filter when you only need to exclude path names.\n- paths - Use the paths filter when you need to filter paths for positive matches and exclude paths." + }, + "ref": { + "properties": { + "branches": { + "$ref": "#/definitions/branch" + }, + "branches-ignore": { + "$ref": "#/definitions/branch" + }, + "tags": { + "$ref": "#/definitions/branch" + }, + "tags-ignore": { + "$ref": "#/definitions/branch" + }, + "paths": { + "$ref": "#/definitions/path" + }, + "paths-ignore": { + "$ref": "#/definitions/path" + } + }, + "oneOf": [ + { + "type": "object", + "allOf": [ + { + "not": { + "required": ["branches", "branches-ignore"] + } + }, + { + "not": { + "required": ["tags", "tags-ignore"] + } + }, + { + "not": { + "required": ["paths", "paths-ignore"] + } + } + ] + }, + { + "type": "null" + } + ] + }, + "shell": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell", + "description": "You can override the default shell settings in the runner's operating system using the shell keyword. You can use built-in shell keywords, or you can define a custom set of shell options.", + "type": "string", + "anyOf": [ + { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#custom-shell" + }, + { + "enum": ["bash", "pwsh", "python", "sh", "cmd", "powershell"] + } + ] + }, + "types": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onevent_nametypes", + "description": "Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.\nYou can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.", + "type": "array", + "minItems": 1, + "additionalItems": false + }, + "working-directory": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun", + "description": "Using the working-directory keyword, you can specify the working directory of where to run the command.", + "type": "string" + } + }, + "properties": { + "name": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#name", + "description": "The name of your workflow. GitHub displays the names of your workflows on your repository's actions page. If you omit this field, GitHub sets the name to the workflow's filename.", + "type": "string" + }, + "on": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#on", + "description": "The name of the GitHub event that triggers the workflow. You can provide a single event 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. For a list of available events, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows.", + "oneOf": [ + { + "$ref": "#/definitions/event" + }, + { + "type": "array", + "items": { "$ref": "#/definitions/event" }, - { - "type": "array", - "items": { - "$ref": "#/definitions/event" - }, - "minItems": 1, - "additionalItems": false - }, - { - "type": "object", - "properties": { - "check_run": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-run-event-check_run", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the check_run event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/runs.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "rerequested", - "completed", - "requested_action" - ] - }, - "default": [ + "minItems": 1, + "additionalItems": false + }, + { + "type": "object", + "properties": { + "check_run": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-run-event-check_run", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the check_run event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/runs.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ "created", "rerequested", "completed", "requested_action" ] - } + }, + "default": [ + "created", + "rerequested", + "completed", + "requested_action" + ] } - }, - "check_suite": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-suite-event-check_suite", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the check_suite event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/suites/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["completed", "requested", "rerequested"] - }, - "default": ["completed", "requested", "rerequested"] - } + } + }, + "check_suite": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-suite-event-check_suite", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the check_suite event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/suites/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["completed", "requested", "rerequested"] + }, + "default": ["completed", "requested", "rerequested"] } - }, - "create": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#create-event-create", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone creates a branch or tag, which triggers the create event. For information about the REST API, see https://developer.github.com/v3/git/refs/#create-a-reference." - }, - "delete": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#delete-event-delete", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone deletes a branch or tag, which triggers the delete event. For information about the REST API, see https://developer.github.com/v3/git/refs/#delete-a-reference." - }, - "deployment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-event-deployment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone creates a deployment, which triggers the deployment event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/." - }, - "deployment_status": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-status-event-deployment_status", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime a third party provides a deployment status, which triggers the deployment_status event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status." - }, - "fork": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#fork-event-fork", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime when someone forks a repository, which triggers the fork event. For information about the REST API, see https://developer.github.com/v3/repos/forks/#create-a-fork." - }, - "gollum": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#gollum-event-gollum", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow when someone creates or updates a Wiki page, which triggers the gollum event." - }, - "issue_comment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issue-comment-event-issue_comment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the issue_comment event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/comments/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } + } + }, + "create": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#create-event-create", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone creates a branch or tag, which triggers the create event. For information about the REST API, see https://developer.github.com/v3/git/refs/#create-a-reference." + }, + "delete": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#delete-event-delete", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone deletes a branch or tag, which triggers the delete event. For information about the REST API, see https://developer.github.com/v3/git/refs/#delete-a-reference." + }, + "deployment": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-event-deployment", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone creates a deployment, which triggers the deployment event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/." + }, + "deployment_status": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-status-event-deployment_status", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime a third party provides a deployment status, which triggers the deployment_status event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status." + }, + "fork": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#fork-event-fork", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime when someone forks a repository, which triggers the fork event. For information about the REST API, see https://developer.github.com/v3/repos/forks/#create-a-fork." + }, + "gollum": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#gollum-event-gollum", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow when someone creates or updates a Wiki page, which triggers the gollum event." + }, + "issue_comment": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issue-comment-event-issue_comment", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the issue_comment event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/comments/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "edited", "deleted"] + }, + "default": ["created", "edited", "deleted"] } - }, - "issues": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issues-event-issues", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the issues event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "opened", - "edited", - "deleted", - "transferred", - "pinned", - "unpinned", - "closed", - "reopened", - "assigned", - "unassigned", - "labeled", - "unlabeled", - "locked", - "unlocked", - "milestoned", - "demilestoned" - ] - }, - "default": [ + } + }, + "issues": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issues-event-issues", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the issues event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ "opened", "edited", "deleted", @@ -472,84 +455,94 @@ "milestoned", "demilestoned" ] - } + }, + "default": [ + "opened", + "edited", + "deleted", + "transferred", + "pinned", + "unpinned", + "closed", + "reopened", + "assigned", + "unassigned", + "labeled", + "unlabeled", + "locked", + "unlocked", + "milestoned", + "demilestoned" + ] } - }, - "label": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#label-event-label", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the label event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/labels/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } + } + }, + "label": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#label-event-label", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the label event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/labels/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "edited", "deleted"] + }, + "default": ["created", "edited", "deleted"] } - }, - "member": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#member-event-member", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the member event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/collaborators/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["added", "edited", "deleted"] - }, - "default": ["added", "edited", "deleted"] - } + } + }, + "member": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#member-event-member", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the member event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/collaborators/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["added", "edited", "deleted"] + }, + "default": ["added", "edited", "deleted"] } - }, - "milestone": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#milestone-event-milestone", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the milestone event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/milestones/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "closed", "opened", "edited", "deleted"] - }, - "default": [ - "created", - "closed", - "opened", - "edited", - "deleted" - ] - } + } + }, + "milestone": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#milestone-event-milestone", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the milestone event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/milestones/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "closed", "opened", "edited", "deleted"] + }, + "default": [ + "created", + "closed", + "opened", + "edited", + "deleted" + ] } - }, - "page_build": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#page-build-event-page_build", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone pushes to a GitHub Pages-enabled branch, which triggers the page_build event. For information about the REST API, see https://developer.github.com/v3/repos/pages/." - }, - "project": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-event-project", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "updated", - "closed", - "reopened", - "edited", - "deleted" - ] - }, - "default": [ + } + }, + "page_build": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#page-build-event-page_build", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone pushes to a GitHub Pages-enabled branch, which triggers the page_build event. For information about the REST API, see https://developer.github.com/v3/repos/pages/." + }, + "project": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-event-project", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the project event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ "created", "updated", "closed", @@ -557,157 +550,216 @@ "edited", "deleted" ] - } + }, + "default": [ + "created", + "updated", + "closed", + "reopened", + "edited", + "deleted" + ] } - }, - "project_card": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-card-event-project_card", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project_card event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/cards.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "moved", - "converted", - "edited", - "deleted" - ] - }, - "default": [ + } + }, + "project_card": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-card-event-project_card", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the project_card event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/cards.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ "created", "moved", "converted", "edited", "deleted" ] - } + }, + "default": [ + "created", + "moved", + "converted", + "edited", + "deleted" + ] + } + } + }, + "project_column": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-column-event-project_column", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the project_column event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/columns.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "updated", "moved", "deleted"] + }, + "default": ["created", "updated", "moved", "deleted"] + } + } + }, + "public": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#public-event-public", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime someone makes a private repository public, which triggers the public event. For information about the REST API, see https://developer.github.com/v3/repos/#edit." + }, + "pull_request": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-event-pull_request", + "$ref": "#/definitions/ref", + "description": "Runs your workflow anytime the pull_request event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ + "assigned", + "unassigned", + "labeled", + "unlabeled", + "opened", + "edited", + "closed", + "reopened", + "synchronize", + "ready_for_review", + "locked", + "unlocked", + "review_requested", + "review_request_removed" + ] + }, + "default": ["opened", "synchronize", "reopened"] } }, - "project_column": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-column-event-project_column", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project_column event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/columns.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "updated", "moved", "deleted"] - }, - "default": ["created", "updated", "moved", "deleted"] - } + "patternProperties": { + "^(branche|tag|path)s(-ignore)?$": { + "type": "array" } }, - "public": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#public-event-public", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone makes a private repository public, which triggers the public event. For information about the REST API, see https://developer.github.com/v3/repos/#edit." + "additionalProperties": false + }, + "pull_request_review": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-event-pull_request_review", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the pull_request_review event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/reviews.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["submitted", "edited", "dismissed"] + }, + "default": ["submitted", "edited", "dismissed"] + } + } + }, + "pull_request_review_comment": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-comment-event-pull_request_review_comment", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the pull_request_review_comment event. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/comments.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": ["created", "edited", "deleted"] + }, + "default": ["created", "edited", "deleted"] + } + } + }, + "push": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#push-event-push", + "description": "Runs your workflow when someone pushes to a repository branch, which triggers the push event.\nNote: The webhook payload available to GitHub Actions does not include the added, removed, and modified attributes in the commit object. You can retrieve the full commit object using the REST API. For more information, see https://developer.github.com/v3/repos/commits/#get-a-single-commit.", + "type": "object", + "$ref": "#/definitions/ref", + "patternProperties": { + "^(branche|tag|path)s(-ignore)?$": { + "type": "array", + "items" : { + "type" : "string" + } + } }, - "pull_request": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-event-pull_request", - "$ref": "#/definitions/ref", - "description": "Runs your workflow anytime the pull_request event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "assigned", - "unassigned", - "labeled", - "unlabeled", - "opened", - "edited", - "closed", - "reopened", - "synchronize", - "ready_for_review", - "locked", - "unlocked", - "review_requested", - "review_request_removed" - ] - }, - "default": ["opened", "synchronize", "reopened"] - } - }, - "patternProperties": { + "additionalProperties": false + }, + "pull_request_target": { + "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target", + "$ref": "#/definitions/ref", + "additionalProperties": false, + "description": "This event is similar to pull_request, except that it runs in the context of the base repository of the pull request, rather than in the merge commit. This means that you can more safely make your secrets available to the workflows triggered by the pull request, because only workflows defined in the commit on the base repository are run. For example, this event allows you to create workflows that label and comment on pull requests, based on the contents of the event payload.", + "patternProperties": { "^(branche|tag|path)s(-ignore)?$": { - "type": "array" } - }, - "additionalProperties": false }, - "pull_request_review": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-event-pull_request_review", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the pull_request_review event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/reviews.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { + "properties": { "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["submitted", "edited", "dismissed"] - }, - "default": ["submitted", "edited", "dismissed"] - } - } - }, - "pull_request_review_comment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-comment-event-pull_request_review_comment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the pull_request_review_comment event. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/comments.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } - } - }, - "push": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#push-event-push", - "description": "Runs your workflow when someone pushes to a repository branch, which triggers the push event.\nNote: The webhook payload available to GitHub Actions does not include the added, removed, and modified attributes in the commit object. You can retrieve the full commit object using the REST API. For more information, see https://developer.github.com/v3/repos/commits/#get-a-single-commit.", - "type": "object", - "$ref": "#/definitions/ref", - "patternProperties": { - "^(branche|tag|path)s(-ignore)?$": { - "type": "array", - "items" : { - "type" : "string" + "$ref": "#/definitions/types", + "default": [ + "opened", + "synchronize", + "reopened" + ], + "items": { + "enum": [ + "assigned", + "unassigned", + "labeled", + "unlabeled", + "opened", + "edited", + "closed", + "reopened", + "synchronize", + "ready_for_review", + "locked", + "unlocked", + "review_requested", + "review_request_removed" + ], + "type": "string" } } - }, - "additionalProperties": false - }, - "release": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#release-event-release", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the release event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/releases/.", - "properties": { + } + }, + "registry_package": { + "$comment": "https://help.github.com/en/actions/reference/events-that-trigger-workflows#registry-package-event-registry_package", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime a package is published or updated. For more information, see https://help.github.com/en/github/managing-packages-with-github-packages.", + "properties": { "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "published", - "unpublished", - "created", - "edited", - "deleted", - "prereleased", - "released" - ] - }, - "default": [ + "$ref": "#/definitions/types", + "default": [ + "published", + "updated" + ], + "items": { + "enum": [ + "published", + "updated" + ], + "type": "string" + } + } + } + }, + "release": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#release-event-release", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the release event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/releases/.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ "published", "unpublished", "created", @@ -716,395 +768,477 @@ "prereleased", "released" ] - } - } - }, - "status": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#status-event-status", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the status of a Git commit changes, which triggers the status event. For information about the REST API, see https://developer.github.com/v3/repos/statuses/." - }, - "watch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#watch-event-watch", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the watch event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/activity/starring/." - }, - "repository_dispatch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#external-events-repository_dispatch", - "$ref": "#/definitions/eventObject", - "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. For more information, see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event.\nTo trigger the custom repository_dispatch webhook event, you must send a POST request to a GitHub API endpoint and provide an event_type name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the repository_dispatch event." - }, - "schedule": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule", - "description": "You can schedule a workflow to run at specific UTC times using POSIX cron syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). 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.\nNote: GitHub Actions does not support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly, and @reboot.\nYou can use crontab guru (https://crontab.guru/). to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of crontab guru examples (https://crontab.guru/examples.html).", - "type": "array", - "items": { - "type": "object", - "properties": { - "cron": { - "$comment": "https://stackoverflow.com/a/57639657/4044345", - "oneOf": [ - { - "pattern": "cron-(.)+" - }, - { - "type": "string", - "pattern": "^(((\\d+,)+\\d+|((\\d+|\\*)\\/\\d+)|(\\d+-\\d+)|\\d+|\\*) ?){5,7}$" - } - ] - } }, - "additionalProperties": false - }, - "minItems": 1, - "additionalItems": false + "default": [ + "published", + "unpublished", + "created", + "edited", + "deleted", + "prereleased", + "released" + ] + } } }, - "additionalProperties": false - } - ] - }, - "env": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env", - "$ref": "#/definitions/env", - "description": "A map of environment variables that are available to all jobs and steps in the workflow." - }, - "defaults": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaults", - "$ref": "#/definitions/defaults", - "description": "A map of default settings that will apply to all jobs in the workflow." - }, - "jobs": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobs", - "description": "A workflow run is made up of one or more jobs. Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the jobs..needs keyword.\nEach job runs in a fresh instance of the virtual environment specified by runs-on.\nYou can run an unlimited number of jobs as long as you are within the workflow usage limits. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#usage-limits.", - "type": "object", - "patternProperties": { - "^[_a-zA-Z][a-zA-Z0-9_-]*$": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_id", - "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 with a string that is unique to the jobs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", - "type": "object", - "properties": { - "name": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idname", - "description": "The name of the job displayed on GitHub.", - "type": "string" - }, - "needs": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idneeds", - "description": "Identifies 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 statement that causes the job to continue.", - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/name" - }, - "minItems": 1, - "additionalItems": false - }, - { - "$ref": "#/definitions/name" - } - ] - }, - "permissions" : { - "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idpermissions", - "description": "You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access", - "oneOf": [ - { - "const": "read-all|write-all" - }, - { - "type" : "object", - "$ref": "#/definitions/gitpermissions" - } - ] - }, - "runs-on": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on", - "description": "The type of machine to run the job on. The machine can be either a GitHub-hosted runner, or a self-hosted runner.", - "oneOf": [ - { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#github-hosted-runners", - "type": "string", - "enum": [ - "${{ matrix.os }}", - "macos-latest", - "macos-10.15", - "self-hosted", - "ubuntu-16.04", - "ubuntu-18.04", - "ubuntu-latest", - "windows-latest", - "windows-2019" - ] - }, - { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#self-hosted-runners", - "type": "array", - "oneOf": [ - { - "items": [ - { - "const": "self-hosted" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/machine" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/architecture" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/machine" - }, - { - "$ref": "#/definitions/architecture" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/architecture" - }, - { - "$ref": "#/definitions/machine" - } - ] - } - ], - "additionalItems": false - } - ] - }, - "outputs": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjobs_idoutputs", - "description": "A map of outputs for a job. Job outputs are available to all downstream jobs that depend on this job.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "minProperties": 1 - }, - "environment": { - "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idenvironment", - "$ref": "#/definitions/environment", - "description": "The environment that the job references" - }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idenv", - "$ref": "#/definitions/env", - "description": "A map of environment variables that are available to all steps in the job." - }, - "defaults": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaults", - "$ref": "#/definitions/defaults", - "description": "A map of default settings that will apply to all steps in the job." - }, - "if": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idif", - "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "steps": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps", - "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 virtual 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.\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid", - "description": "A unique identifier for the step. You can use the id to reference the step in contexts. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "if": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsif", - "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "name": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsname", - "description": "A name for your step to display on GitHub.", - "type": "string" - }, - "uses": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsuses", - "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 (https://hub.docker.com/).\nWe strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker tag number. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.\n- Using the commit SHA of a released action version is the safest for stability and security.\n- Using the specific major action version allows you to receive critical fixes and security patches while still maintaining compatibility. It also assures that your workflow should still work.\n- Using the master branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.\nSome actions require inputs that you must set using the with keyword. Review the action's README file to determine the inputs required.\nActions are either JavaScript files or Docker containers. If the action you're using is a Docker container you must run the job in a Linux virtual environment. For more details, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "type": "string" - }, - "run": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsrun", - "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.\nCommands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. For more information, see https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell.\nEach 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.", - "type": "string" - }, - "working-directory": { - "$ref": "#/definitions/working-directory" - }, - "shell": { - "$ref": "#/definitions/shell" - }, - "with": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswith", - "$ref": "#/definitions/env", - "description": "A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as environment variables. The variable is prefixed with INPUT_ and converted to upper case.", - "properties": { - "args": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithargs", - "type": "string" - }, - "entrypoint": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithentrypoint", - "type": "string" - } - } - }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv", - "$ref": "#/definitions/env", - "description": "Sets environment variables for steps to use in the virtual environment. You can also set environment variables for the entire workflow or a job." - }, - "continue-on-error": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error", - "description": "Prevents a job from failing when a step fails. Set to true to allow a job to pass when this step fails.", - "type": "boolean", - "default": false - }, - "timeout-minutes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes", - "description": "The maximum number of minutes to run the step before killing the process.", - "type": "number" - } - }, - "dependencies": { - "working-directory": ["run"], - "shell": ["run"] - }, - "additionalProperties": false - }, - "minItems": 1, - "additionalItems": false - }, - "timeout-minutes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes", - "description": "The maximum number of minutes to let a workflow run before GitHub automatically cancels it. Default: 360", - "type": "number", - "default": 360 - }, - "strategy": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy", - "description": "A strategy creates a build matrix for your jobs. You can define different variations of an environment to run each job in.", + "status": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#status-event-status", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the status of a Git commit changes, which triggers the status event. For information about the REST API, see https://developer.github.com/v3/repos/statuses/." + }, + "watch": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#watch-event-watch", + "$ref": "#/definitions/eventObject", + "description": "Runs your workflow anytime the watch event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/activity/starring/." + }, + "repository_dispatch": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#external-events-repository_dispatch", + "$ref": "#/definitions/eventObject", + "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. For more information, see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event.\nTo trigger the custom repository_dispatch webhook event, you must send a POST request to a GitHub API endpoint and provide an event_type name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the repository_dispatch event." + }, + "schedule": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule", + "description": "You can schedule a workflow to run at specific UTC times using POSIX cron syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). 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.\nNote: GitHub Actions does not support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly, and @reboot.\nYou can use crontab guru (https://crontab.guru/). to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of crontab guru examples (https://crontab.guru/examples.html).", + "type": "array", + "items": { "type": "object", "properties": { - "matrix": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix", - "description": "A build matrix is a set of different configurations of the virtual environment. For example you might run a job against more than one supported version of a language, operating system, or tool. Each configuration is a copy of the job that runs and reports a status.\nYou can specify a matrix by supplying an array for the configuration options. For example, if the GitHub virtual environment supports Node.js versions 6, 8, and 10 you could specify an array of those versions in the matrix.\nWhen you define a matrix of operating systems, you must set the required runs-on keyword to the operating system of the current job, rather than hard-coding the operating system name. To access the operating system name, you can use the matrix.os context parameter to set runs-on. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "object", - "patternProperties": { - "^(in|ex)clude$": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/configuration" - } - }, - "minItems": 1, - "additionalItems": false - } - }, - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/configuration" - }, - "minItems": 1, - "additionalItems": false - }, - "minProperties": 1 - }, - "fail-fast": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast", - "description": "When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true", - "type": "boolean", - "default": true - }, - "max-parallel": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel", - "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 the available runners on GitHub-hosted virtual machines.", - "type": "number" + "cron": { + "$comment": "https://stackoverflow.com/a/57639657/4044345", + "oneOf": [ + { + "pattern": "cron-(.)+" + } + ] } }, "additionalProperties": false }, - "continue-on-error": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error", - "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.", - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - }, - "container": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainer", - "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.\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.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/container" + "minItems": 1, + "additionalItems": false + }, + "workflow_dispatch": { + "$comment": "https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/", + "description": "You can now create workflows that are manually triggered with the new workflow_dispatch event. You will then see a 'Run workflow' button on the Actions tab, enabling you to easily trigger a run.", + "properties": { + "inputs": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputs", + "description": "Input parameters allow you to specify data that the action expects to use during runtime. GitHub stores input parameters as environment variables. Input ids with uppercase letters are converted to lowercase during runtime. We recommended using lowercase input ids.", + "type": "object", + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_id", + "description": "A string identifier to associate with the input. The value of is a map of the input's metadata. The must be a unique identifier within the inputs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", + "type": "object", + "properties": { + "description": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddescription", + "description": "A string description of the input parameter.", + "type": "string" + }, + "deprecationMessage": { + "description": "A string shown to users using the deprecated input.", + "type": "string" + }, + "required": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_idrequired", + "description": "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.", + "type": "boolean" + }, + "default": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddefault", + "description": "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file.", + "type": "string" + } + }, + "required": [ + "description", + "required" + ], + "additionalProperties": false } - ] - } - }, - "services": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idservices", - "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.\nWhen 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.\nWhen 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.\nWhen a step does not use a container action, you must access the service using localhost and bind the ports.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/container" + }, + "additionalProperties": false } } }, - "required": ["runs-on", "steps"], - "additionalProperties": false - } - }, - "minProperties": 1, - "additionalProperties": false - } + "workflow_run": { + "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run", + "$ref": "#/definitions/eventObject", + "description": "This event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow. For example, if your pull_request workflow generates build artifacts, you can create a new workflow that uses workflow_run to analyze the results and add a comment to the original pull request.", + "properties": { + "types": { + "$ref": "#/definitions/types", + "items": { + "type": "string", + "enum": [ + "requested", + "completed" + ] + }, + "default": [ + "requested", + "completed" + ] + }, + "workflows": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "patternProperties": { + "^branches(-ignore)?$": {} + } + } + }, + "additionalProperties": false + } + ] }, - "required": ["on", "jobs"], - "additionalProperties": false - } \ No newline at end of file + "env": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env", + "$ref": "#/definitions/env", + "description": "A map of environment variables that are available to all jobs and steps in the workflow." + }, + "defaults": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaults", + "$ref": "#/definitions/defaults", + "description": "A map of default settings that will apply to all jobs in the workflow." + }, + "jobs": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobs", + "description": "A workflow run is made up of one or more jobs. Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the jobs..needs keyword.\nEach job runs in a fresh instance of the virtual environment specified by runs-on.\nYou can run an unlimited number of jobs as long as you are within the workflow usage limits. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#usage-limits.", + "type": "object", + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_id", + "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 with a string that is unique to the jobs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", + "type": "object", + "properties": { + "name": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idname", + "description": "The name of the job displayed on GitHub.", + "type": "string" + }, + "needs": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idneeds", + "description": "Identifies 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 statement that causes the job to continue.", + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/name" + }, + "minItems": 1, + "additionalItems": false + }, + { + "$ref": "#/definitions/name" + } + ] + }, + "permissions" : { + "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idpermissions", + "description": "You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access", + "oneOf": [ + { + "const": "read-all|write-all" + }, + { + "type" : "object", + "$ref": "#/definitions/gitpermissions" + } + ] + }, + "runs-on": { + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on", + "description": "The type of machine to run the job on. The machine can be either a GitHub-hosted runner, or a self-hosted runner.", + "oneOf": [ + { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#github-hosted-runners", + "type": "string", + "enum": [ + "${{ matrix.os }}", + "macos-latest", + "macos-10.15", + "self-hosted", + "ubuntu-16.04", + "ubuntu-18.04", + "ubuntu-latest", + "windows-latest", + "windows-2019" + ] + }, + { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#self-hosted-runners", + "type": "array", + "oneOf": [ + { + "items": [ + { + "const": "self-hosted" + } + ] + }, + { + "items": [ + { + "const": "self-hosted" + }, + { + "$ref": "#/definitions/machine" + } + ] + }, + { + "items": [ + { + "const": "self-hosted" + }, + { + "$ref": "#/definitions/architecture" + } + ] + }, + { + "items": [ + { + "const": "self-hosted" + }, + { + "$ref": "#/definitions/machine" + }, + { + "$ref": "#/definitions/architecture" + } + ] + }, + { + "items": [ + { + "const": "self-hosted" + }, + { + "$ref": "#/definitions/architecture" + }, + { + "$ref": "#/definitions/machine" + } + ] + } + ], + "additionalItems": false + } + ] + }, + "outputs": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjobs_idoutputs", + "description": "A map of outputs for a job. Job outputs are available to all downstream jobs that depend on this job.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "minProperties": 1 + }, + "environment": { + "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idenvironment", + "$ref": "#/definitions/environment", + "description": "The environment that the job references" + }, + "env": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idenv", + "$ref": "#/definitions/env", + "description": "A map of environment variables that are available to all steps in the job." + }, + "defaults": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaults", + "$ref": "#/definitions/defaults", + "description": "A map of default settings that will apply to all steps in the job." + }, + "if": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idif", + "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", + "type": "string" + }, + "steps": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps", + "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 virtual 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.\n", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid", + "description": "A unique identifier for the step. You can use the id to reference the step in contexts. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", + "type": "string" + }, + "if": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsif", + "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", + "type": "string" + }, + "name": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsname", + "description": "A name for your step to display on GitHub.", + "type": "string" + }, + "uses": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsuses", + "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 (https://hub.docker.com/).\nWe strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker tag number. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.\n- Using the commit SHA of a released action version is the safest for stability and security.\n- Using the specific major action version allows you to receive critical fixes and security patches while still maintaining compatibility. It also assures that your workflow should still work.\n- Using the master branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.\nSome actions require inputs that you must set using the with keyword. Review the action's README file to determine the inputs required.\nActions are either JavaScript files or Docker containers. If the action you're using is a Docker container you must run the job in a Linux virtual environment. For more details, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", + "type": "string" + }, + "run": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsrun", + "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.\nCommands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. For more information, see https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell.\nEach 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.", + "type": "string" + }, + "working-directory": { + "$ref": "#/definitions/working-directory" + }, + "shell": { + "$ref": "#/definitions/shell" + }, + "with": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswith", + "$ref": "#/definitions/env", + "description": "A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as environment variables. The variable is prefixed with INPUT_ and converted to upper case.", + "properties": { + "args": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithargs", + "type": "string" + }, + "entrypoint": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithentrypoint", + "type": "string" + } + } + }, + "env": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv", + "$ref": "#/definitions/env", + "description": "Sets environment variables for steps to use in the virtual environment. You can also set environment variables for the entire workflow or a job." + }, + "continue-on-error": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error", + "description": "Prevents a job from failing when a step fails. Set to true to allow a job to pass when this step fails.", + "type": "boolean", + "default": false + }, + "timeout-minutes": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes", + "description": "The maximum number of minutes to run the step before killing the process.", + "type": "number" + } + }, + "dependencies": { + "working-directory": ["run"], + "shell": ["run"] + }, + "additionalProperties": false + }, + "minItems": 1, + "additionalItems": false + }, + "timeout-minutes": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes", + "description": "The maximum number of minutes to let a workflow run before GitHub automatically cancels it. Default: 360", + "type": "number", + "default": 360 + }, + "strategy": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy", + "description": "A strategy creates a build matrix for your jobs. You can define different variations of an environment to run each job in.", + "type": "object", + "properties": { + "matrix": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix", + "description": "A build matrix is a set of different configurations of the virtual environment. For example you might run a job against more than one supported version of a language, operating system, or tool. Each configuration is a copy of the job that runs and reports a status.\nYou can specify a matrix by supplying an array for the configuration options. For example, if the GitHub virtual environment supports Node.js versions 6, 8, and 10 you could specify an array of those versions in the matrix.\nWhen you define a matrix of operating systems, you must set the required runs-on keyword to the operating system of the current job, rather than hard-coding the operating system name. To access the operating system name, you can use the matrix.os context parameter to set runs-on. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", + "type": "object", + "patternProperties": { + "^(in|ex)clude$": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/configuration" + } + }, + "minItems": 1, + "additionalItems": false + } + }, + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/configuration" + }, + "minItems": 1, + "additionalItems": false + }, + "minProperties": 1 + }, + "fail-fast": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast", + "description": "When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true", + "type": "boolean", + "default": true + }, + "max-parallel": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel", + "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 the available runners on GitHub-hosted virtual machines.", + "type": "number" + } + }, + "additionalProperties": false + }, + "continue-on-error": { + "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error", + "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.", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + }, + "container": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainer", + "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.\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.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/container" + } + ] + } + }, + "services": { + "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idservices", + "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.\nWhen 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.\nWhen 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.\nWhen a step does not use a container action, you must access the service using localhost and bind the ports.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/container" + } + } + }, + "required": ["runs-on", "steps"], + "additionalProperties": false + } + }, + "minProperties": 1, + "additionalProperties": false + } + }, + "required": ["on", "jobs"], + "additionalProperties": false +} \ No newline at end of file From db7bb321d0081adb40c03ba192e812adc02f952c Mon Sep 17 00:00:00 2001 From: Aparna Ravindra <82894348+aparna-ravindra@users.noreply.github.com> Date: Thu, 22 Jul 2021 15:34:39 +0530 Subject: [PATCH 27/61] Delete manual.yml --- .github/workflows/manual.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml deleted file mode 100644 index 3045613..0000000 --- a/.github/workflows/manual.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Aparna Validate This -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v2 - - name: Setup Node - uses: actions/setup-node@v2 - - name: Run validator - uses: aparna-ravindra/workflow-template-validator@v0.4 - with: - path-to-workflow-yaml: './ci,./automation' - path-to-properties-json: './ci/properties,./automation/properties' - path-to-icons: './icons' From d2451b84c55acdfe57efa7e77486d16d7361a263 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Thu, 22 Jul 2021 15:41:01 +0530 Subject: [PATCH 28/61] merge from main --- ci/maven.yml | 2 +- ci/nix.yml | 29 -- ci/npm-publish.yml | 4 +- ci/properties/nix.properties.json | 6 - ci/python-publish.yml | 17 +- icons/nix.svg | 513 ------------------------------ 6 files changed, 11 insertions(+), 560 deletions(-) delete mode 100644 ci/nix.yml delete mode 100644 ci/properties/nix.properties.json delete mode 100644 icons/nix.svg diff --git a/ci/maven.yml b/ci/maven.yml index 1ae5d62..923425b 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -22,4 +22,4 @@ jobs: java-version: '11' distribution: 'adopt' - name: Build with Maven - run: mvn --batch-mode --update-snapshots verify + run: mvn -B package --file pom.xml diff --git a/ci/nix.yml b/ci/nix.yml deleted file mode 100644 index b42fe3e..0000000 --- a/ci/nix.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -name: Nix - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.1 - - name: Install Nix - uses: cachix/install-nix-action@95a8068e317b8def9482980abe762f36c77ccc99 - - name: Install Cachix - - uses: cachix/cachix-action@490a246fbc7f92208d309eeb54383a4d828cedc1 - with: - # Once you generate a binary cache on https://app.cachix.org, you'll need to insert the name of the cache here - name: mycache - signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - - name: Run nix-build - run: nix-build - - name: Check nix-shell works - run: nix-shell --run "echo OK" \ No newline at end of file diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index 177192b..0701ddb 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -30,7 +30,7 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NODE_AUTH_TOKEN: ${{secrets.npm_token}} publish-gpr: needs: build @@ -47,4 +47,4 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/ci/properties/nix.properties.json b/ci/properties/nix.properties.json deleted file mode 100644 index 3a90d75..0000000 --- a/ci/properties/nix.properties.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Nix", - "description": "Build Nix project", - "iconName": "nix", - "categories": ["Nix"] -} diff --git a/ci/python-publish.yml b/ci/python-publish.yml index 2ac1e53..400548b 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -26,12 +26,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/icons/nix.svg b/icons/nix.svg deleted file mode 100644 index 9a70a14..0000000 --- a/icons/nix.svg +++ /dev/null @@ -1,513 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - From db54a4d59bc4f3a133a65a178c26b88b9e18a8a2 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Thu, 22 Jul 2021 15:48:19 +0530 Subject: [PATCH 29/61] fixing runs-on --- ci/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/r.yml b/ci/r.yml index efc6587..f257fbd 100644 --- a/ci/r.yml +++ b/ci/r.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: macOS-latest + runs-on: macos-latest strategy: matrix: r-version: [3.5, 3.6] From 648a6f0987aa771c615328c0b885352a2df6d5bc Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Thu, 22 Jul 2021 15:54:07 +0530 Subject: [PATCH 30/61] merge from main --- .github/workflows/workflow_input.yml | 30 ---------------------------- 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/workflow_input.yml diff --git a/.github/workflows/workflow_input.yml b/.github/workflows/workflow_input.yml deleted file mode 100644 index 47f24e1..0000000 --- a/.github/workflows/workflow_input.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This is a basic workflow that is manually triggered - -name: Manual workflow - -# Controls when the action will run. Workflow runs when manually triggered using the UI -# or API. -on: - workflow_dispatch: - # Inputs the workflow accepts. - inputs: - name: - # Friendly description to be shown in the UI instead of 'name' - description: 'Person to greet' - # Default value if no value is explicitly provided - default: 'World' - # Input has to be provided for the workflow to run - required: true - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "greet" - greet: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Runs a single command using the runners shell - - name: Send greeting - run: echo "Hello ${{ github.event.inputs.name }}" From c13101078d71df6287898a30cbed4c3273d0e9d5 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Mon, 26 Jul 2021 14:26:37 +0530 Subject: [PATCH 31/61] reverting --- ci/npm-publish.yml | 2 +- ci/python-publish.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index 0701ddb..025976d 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -47,4 +47,4 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/ci/python-publish.yml b/ci/python-publish.yml index 400548b..1c69e34 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -33,4 +33,5 @@ jobs: uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + password: ${{ secrets.PYPI_API_TOKEN }} + \ No newline at end of file From 461a5663897d7f872b7f8e0d6953c99ced7d73ec Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Mon, 26 Jul 2021 14:27:21 +0530 Subject: [PATCH 32/61] reverting --- ci/python-publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/python-publish.yml b/ci/python-publish.yml index 1c69e34..3bfabfc 100644 --- a/ci/python-publish.yml +++ b/ci/python-publish.yml @@ -34,4 +34,3 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} - \ No newline at end of file From 8ba0ca0797f1852b9f689a07c015c19bc723c980 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Mon, 26 Jul 2021 11:26:46 -0400 Subject: [PATCH 33/61] Remove extra character (#1023) --- ci/ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/ios.yml b/ci/ios.yml index 032b77a..ab92d32 100644 --- a/ci/ios.yml +++ b/ci/ios.yml @@ -26,7 +26,7 @@ jobs: platform: ${{ 'iOS Simulator' }} run: | # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) - device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`` + device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'` if [ $scheme = default ]; then scheme=$(cat default); fi if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi file_to_build=`echo $file_to_build | awk '{$1=$1;print}'` From 5ba97df54d7ca126e06bc34e57de480349aca331 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 26 Jul 2021 13:22:45 -0400 Subject: [PATCH 34/61] Remove matrix for Deno template. (#1024) Fixes: The actions/checkout action on windows checks out files with \r\n line endings instead of preserving them. This causes deno fmt --check to fail because the line endings are \r\n instead of \n. Instead of working around this problem specifically on Windows, this change removes the matrix in order to simplify the action. Co-authored-by: Josh Gross --- ci/deno.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/ci/deno.yml b/ci/deno.yml index cf91f5e..38f2319 100644 --- a/ci/deno.yml +++ b/ci/deno.yml @@ -3,7 +3,7 @@ # separate terms of service, privacy policy, and support # documentation. -# This workflow will install Deno and run tests across stable and canary builds on Windows, Ubuntu and macOS. +# This workflow will install Deno then run Deno lint and test. # For more information see: https://github.com/denoland/setup-deno name: Deno @@ -16,12 +16,7 @@ on: jobs: test: - runs-on: ${{ matrix.os }} # runs a test on Ubuntu, Windows and macOS - - strategy: - matrix: - deno: ["v1.x", "canary"] - os: [macOS-latest, windows-latest, ubuntu-latest] + runs-on: ubuntu-latest steps: - name: Setup repo @@ -29,9 +24,9 @@ jobs: - name: Setup Deno # uses: denoland/setup-deno@v1 - uses: denoland/setup-deno@4a4e59637fa62bd6c086a216c7e4c5b457ea9e79 + uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e9833173669 with: - deno-version: ${{ matrix.deno }} # tests across multiple Deno versions + deno-version: v1.x # Uncomment this step to verify the use of 'deno fmt' on each commit. # - name: Verify formatting @@ -40,8 +35,5 @@ jobs: - name: Run linter run: deno lint - - name: Cache dependencies - run: deno cache deps.ts - - name: Run tests run: deno test -A --unstable From e02c6fb241207dd30fef8f344a2df7574ee3db6a Mon Sep 17 00:00:00 2001 From: Aparna Ravindra <82894348+aparna-ravindra@users.noreply.github.com> Date: Wed, 28 Jul 2021 07:46:24 +0530 Subject: [PATCH 35/61] adding performance measure --- script/validate-data/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index 81048f8..cecaf6b 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -4,6 +4,7 @@ import { safeLoad } from "js-yaml"; import { basename, extname, join } from "path"; import { Validator as validator } from "jsonschema"; import { endGroup, error, info, setFailed, startGroup } from '@actions/core'; +import { performance } from 'perf_hooks'; interface WorkflowWithErrors { id: string; @@ -98,9 +99,12 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom (async function main() { try { const settings = require("./settings.json"); + var t0 = performance.now() const erroredWorkflows = await checkWorkflows( settings.folders ) + var t1 = performance.now() + info("Call to checkWorkflows took " + (t1 - t0) + " milliseconds.") if (erroredWorkflows.length > 0) { startGroup(`😟 - Found ${erroredWorkflows.length} workflows with errors:`); From 74200f122dee7d4100a784513de0cc7faee04e53 Mon Sep 17 00:00:00 2001 From: jxlwqq Date: Thu, 29 Jul 2021 01:02:21 +0800 Subject: [PATCH 36/61] Fix login TKE registry error (#882) Error response from daemon: Get https://ccr.ccs.tencentyun.com/v2/: unauthorized: authentication required Co-authored-by: Josh Gross --- ci/tencent.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/tencent.yml b/ci/tencent.yml index 1a059a6..0be339e 100644 --- a/ci/tencent.yml +++ b/ci/tencent.yml @@ -43,7 +43,7 @@ jobs: - name: Login TKE Registry run: | - docker login -u ${{ secrets.TENCENT_CLOUD_ACCOUNT_ID }} -p ${{ secrets.TKE_REGISTRY_PASSWORD }} ${TKE_IMAGE_URL} + docker login -u ${{ secrets.TENCENT_CLOUD_ACCOUNT_ID }} -p '${{ secrets.TKE_REGISTRY_PASSWORD }}' ${TKE_IMAGE_URL} # Push the Docker image to TKE Registry - name: Publish @@ -73,4 +73,4 @@ jobs: ./kustomize edit set image ${TKE_IMAGE_URL}:${GITHUB_SHA} ./kustomize build . | kubectl apply -f - kubectl rollout status deployment/${DEPLOYMENT_NAME} - kubectl get services -o wide \ No newline at end of file + kubectl get services -o wide From bc28e7ed6b0c14a520a85ff34a4fc124ca8a4b9f Mon Sep 17 00:00:00 2001 From: Yong Yan Date: Wed, 28 Jul 2021 14:08:48 -0700 Subject: [PATCH 37/61] Replace action tag with commit hash. --- code-scanning/flawfinder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-scanning/flawfinder.yml b/code-scanning/flawfinder.yml index 9479847..080953e 100644 --- a/code-scanning/flawfinder.yml +++ b/code-scanning/flawfinder.yml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v2 - name: flawfinder_scan - uses: david-a-wheeler/flawfinder@2.0.19-alpha1 + uses: david-a-wheeler/flawfinder@8e4a779ad59dbfaee5da586aa9210853b701959c with: arguments: '--sarif ./' output: 'flawfinder_results.sarif' From 7135450ec14e7e47bf3e41dd65d399e5e315fa39 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Thu, 29 Jul 2021 09:24:43 -0700 Subject: [PATCH 38/61] Update README.md --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e276691..2c2f1b5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,8 @@ These are the workflow files for helping people get started with GitHub Actions. -**Directory structure:** +### Directory structure + * [ci](ci): solutions for Continuous Integration * [automation](automation): solutions for automating workflows. * [code-scanning](code-scanning): starter workflows for [Code Scanning](https://github.com/features/security) @@ -20,8 +21,16 @@ Each workflow must be written in YAML and have a `.yml` extension. They also nee For example: `ci/django.yml` and `ci/properties/django.properties.json`. -**Valid properties:** +### Valid properties + * `name`: the name shown in onboarding * `description`: the description shown in onboarding * `iconName`: the icon name in the relevant folder, for example `django` should have an icon `icons/django.svg`. Only SVG is supported at this time * `categories`: the categories that it will be shown under + +### Variables +These variables can be placed in the starter workflow and will be substituted as detailed below: + +* `$default-branch`: will substitute the branch from the repository, for example `main` and `master` +* `$protected-branches`: will substitue any protected branches from the repository. +* `$cron-daily`: will substitute a valid but random time within the day From bd814059fc9a15c1024948fdbb5c0f512666a766 Mon Sep 17 00:00:00 2001 From: Zachary Conger Date: Thu, 5 Aug 2021 06:39:44 -0600 Subject: [PATCH 39/61] update stackhawk code scanning workflow description --- code-scanning/properties/stackhawk.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-scanning/properties/stackhawk.properties.json b/code-scanning/properties/stackhawk.properties.json index de29b7a..f422535 100644 --- a/code-scanning/properties/stackhawk.properties.json +++ b/code-scanning/properties/stackhawk.properties.json @@ -1,7 +1,7 @@ { "name": "StackHawk", "creator": "StackHawk", - "description": "Integrate dynamic application security testing (DAST) into your CI pipeline with StackHawk", + "description": "Integrate dynamic application security testing (DAST) and API security testing into your CI pipeline with StackHawk", "iconName": "stackhawk", "categories": [ "Code Scanning", From 443876fc449e5fc8767c5f9ebe0d0fb36b580d9e Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Tue, 10 Aug 2021 20:15:41 +0100 Subject: [PATCH 40/61] add labeller workflow to triage code scanning PRs --- .github/labeler.yml | 3 +++ .github/workflows/labeler-triage.yml | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler-triage.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..2d04e26 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,3 @@ +# Add 'code-scanning' label to any changes within 'code-scanning' folder or any subfolders +code-scanning: +- code-scanning/**/* diff --git a/.github/workflows/labeler-triage.yml b/.github/workflows/labeler-triage.yml new file mode 100644 index 0000000..ce0cff3 --- /dev/null +++ b/.github/workflows/labeler-triage.yml @@ -0,0 +1,11 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file From 9267d74ede7efdc46434eec1d69423b1b0ca617c Mon Sep 17 00:00:00 2001 From: Nick Fyson Date: Thu, 12 Aug 2021 12:33:42 +0100 Subject: [PATCH 41/61] add specific permissions to the labeler-triage workflow --- .github/workflows/labeler-triage.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/labeler-triage.yml b/.github/workflows/labeler-triage.yml index ce0cff3..eba05f0 100644 --- a/.github/workflows/labeler-triage.yml +++ b/.github/workflows/labeler-triage.yml @@ -1,4 +1,9 @@ name: "Pull Request Labeler" + +permissions: + contents: read + pull-requests: write + on: - pull_request_target From d8d19f1d62ef5216f0e6b509af17d4a0cc32c3c7 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Mon, 16 Aug 2021 15:36:31 +0530 Subject: [PATCH 42/61] extra validation for name and icon fields --- script/validate-data/index.ts | 84 +++++++++++++++++------------------ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index 162589b..a448e79 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -4,10 +4,10 @@ import { safeLoad } from "js-yaml"; import { basename, extname, join } from "path"; import { Validator as validator } from "jsonschema"; import { endGroup, error, info, setFailed, startGroup } from '@actions/core'; -import { performance } from 'perf_hooks'; interface WorkflowWithErrors { id: string; + name: string; errors: string[]; } @@ -21,7 +21,7 @@ interface WorkflowProperties { const propertiesSchema = { type: "object", properties: { - name: { type: "string", required: true }, + name: { type: "string", required: true , "minLength": 1}, description: { type: "string", required: true }, creator: { type: "string", required: false }, iconName: { type: "string", required: true }, @@ -39,9 +39,10 @@ const propertiesSchema = { }, } } + async function checkWorkflows(folders: string[]): Promise { const result: WorkflowWithErrors[] = [] - + const workflow_template_names : string[] = [] for (const folder of folders) { const dir = await fs.readdir(folder, { withFileTypes: true, @@ -54,9 +55,17 @@ async function checkWorkflows(folders: string[]): Promise const workflowFilePath = join(folder, e.name); const propertiesFilePath = join(folder, "properties", `${fileType}.properties.json`) - const errors = await checkWorkflow(workflowFilePath, propertiesFilePath); - if (errors.errors.length > 0) { - result.push(errors) + const workflowWithErrors = await checkWorkflow(workflowFilePath, propertiesFilePath); + if(workflowWithErrors.name) { + if(workflow_template_names.includes(workflowWithErrors.name)) { + workflowWithErrors.errors.push(`Workflow template name "${workflowWithErrors.name}" already exists`) + } + else { + workflow_template_names.push(workflowWithErrors.name) + } + } + if (workflowWithErrors.errors.length > 0) { + result.push(workflowWithErrors) } } } @@ -65,48 +74,42 @@ async function checkWorkflows(folders: string[]): Promise return result; } -async function validateWorkflowProperties(propertiesPath: string) : Promise { - try { - let errors = [] - const propertiesFileContent = await fs.readFile(propertiesPath, "utf8") - const properties: WorkflowProperties = JSON.parse(propertiesFileContent) - - let v = new validator(); - const res = v.validate(properties, propertiesSchema) - errors = res.errors.map(e => e.toString()) - if (properties.iconName && !properties.iconName.startsWith("octicon")) { - try { - await fs.access(`../../icons/${properties.iconName}.svg`) - } catch (e) { - errors.push(`No icon named ${properties.iconName} found`) - } - } - return errors - } - catch (e) { - throw e - } -} - async function checkWorkflow(workflowPath: string, propertiesPath: string): Promise { let workflowErrors: WorkflowWithErrors = { id: workflowPath, + name: null, errors: [] } try { - workflowErrors.errors = await validateWorkflowProperties(propertiesPath) - const workflowFileContent = await fs.readFile(workflowPath, "utf8"); - const workflow = safeLoad(workflowFileContent); // Validate yaml parses without error - - let workflowValidator = new validator(); - const workflowSchema = require("./workflow-schema.json"); - - const workflowValidationResult = workflowValidator.validate(workflow, workflowSchema) - const workflowValidationErrors = workflowValidationResult.errors.map(e => e.toString()) - workflowErrors.errors = workflowErrors.errors.concat(workflowValidationErrors) + safeLoad(workflowFileContent); // Validate yaml parses without error + + const propertiesFileContent = await fs.readFile(propertiesPath, "utf8") + const properties: WorkflowProperties = JSON.parse(propertiesFileContent) + if(properties.name && properties.name.trim.length > 0) { + workflowErrors.name = properties.name + } + let v = new validator(); + const res = v.validate(properties, propertiesSchema) + workflowErrors.errors = res.errors.map(e => e.toString()) + if (properties.iconName) { + if(!properties.iconName.startsWith("octicon ")) { + try { + await fs.access(`../../icons/${properties.iconName}.svg`) + } catch (e) { + workflowErrors.errors.push(`No icon named ${properties.iconName} found`) + } + } + else { + let iconName = properties.iconName.match(/octicon\s+(.*)/) + if(!iconName || !iconName[1] || iconName[1].length == 0) { + workflowErrors.errors.push(`No icon named ${properties.iconName} found`) + } + } + + } } catch (e) { workflowErrors.errors.push(e.toString()) } @@ -116,12 +119,9 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom (async function main() { try { const settings = require("./settings.json"); - var t0 = performance.now() const erroredWorkflows = await checkWorkflows( settings.folders ) - var t1 = performance.now() - info("Call to checkWorkflows took " + (t1 - t0) + " milliseconds.") if (erroredWorkflows.length > 0) { startGroup(`😟 - Found ${erroredWorkflows.length} workflows with errors:`); From c090ea2f1b31ba57b4e7024200b45435e931cce2 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Mon, 16 Aug 2021 15:42:50 +0530 Subject: [PATCH 43/61] removing unused file --- script/validate-data/index.ts | 2 +- script/validate-data/workflow-schema.json | 1244 --------------------- 2 files changed, 1 insertion(+), 1245 deletions(-) delete mode 100644 script/validate-data/workflow-schema.json diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index a448e79..712efe1 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -137,4 +137,4 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom error(`Unhandled error while syncing workflows: ${e}`); setFailed(`Unhandled error`) } -})(); \ No newline at end of file +})(); diff --git a/script/validate-data/workflow-schema.json b/script/validate-data/workflow-schema.json deleted file mode 100644 index b3e7b8c..0000000 --- a/script/validate-data/workflow-schema.json +++ /dev/null @@ -1,1244 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions", - "definitions": { - "architecture": { - "type": "string", - "enum": ["ARM32", "x64", "x86"] - }, - "branch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestbranchestags", - "$ref": "#/definitions/globs", - "description": "When using the push and pull_request events, you can configure a workflow to run on specific branches or tags. If you only define only tags or only branches, the workflow won't run for events affecting the undefined Git ref.\nThe branches, branches-ignore, tags, and tags-ignore keywords accept glob patterns that use the * and ** wildcard characters to match more than one branch or tag name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nThe patterns defined in branches and tags are evaluated against the Git ref's name. For example, defining the pattern mona/octocat in branches will match the refs/heads/mona/octocat Git ref. The pattern releases/** will match the refs/heads/releases/10 Git ref.\nYou can use two types of filters to prevent a workflow from running on pushes and pull requests to tags and branches:\n- branches or branches-ignore - You cannot use both the branches and branches-ignore filters for the same event in a workflow. Use the branches filter when you need to filter branches for positive matches and exclude branches. Use the branches-ignore filter when you only need to exclude branch names.\n- tags or tags-ignore - You cannot use both the tags and tags-ignore filters for the same event in a workflow. Use the tags filter when you need to filter tags for positive matches and exclude tags. Use the tags-ignore filter when you only need to exclude tag names.\nYou can exclude tags and branches using the ! character. The order that you define patterns matters.\n- A matching negative pattern (prefixed with !) after a positive match will exclude the Git ref.\n- A matching positive pattern after a negative match will include the Git ref again." - }, - "configuration": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/configuration" - } - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/configuration" - }, - "additionalItems": false - } - ] - }, - "container": { - "type": "object", - "properties": { - "image": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerimage", - "description": "The Docker image to use as the container to run the action. The value can be the Docker Hub image name or a public docker registry name.", - "type": "string" - }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerenv", - "$ref": "#/definitions/env", - "description": "Sets an array of environment variables in the container." - }, - "ports": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerports", - "description": "Sets an array of ports to expose on the container.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 1, - "additionalItems": false - }, - "volumes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes", - "description": "Sets 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.\nTo specify a volume, you specify the source and destination path: :\nThe is a volume name or an absolute path on the host machine, and is an absolute path in the container.", - "type": "array", - "items": { - "type": "string", - "pattern": "^[^:]+:[^:]+$" - }, - "minItems": 1, - "additionalItems": false - }, - "options": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontaineroptions", - "description": "Additional Docker container resource options. For a list of options, see https://docs.docker.com/engine/reference/commandline/create/#options.", - "type": "string" - } - }, - "required": ["image"], - "additionalProperties": false - }, - "defaults": { - "type": "object", - "properties": { - "run": { - "type": "object", - "properties": { - "shell": { - "$ref": "#/definitions/shell" - }, - "working-directory": { - "$ref": "#/definitions/working-directory" - } - }, - "minProperties": 1, - "additionalProperties": false - } - }, - "minProperties": 1, - "additionalProperties": false - }, - "env": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "minProperties": 1 - }, - "environment": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "name": {"type": "string"}, - "url": {"type": "string"} - } - } - ] - }, - "event": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows", - "type": "string", - "enum": [ - "check_run", - "check_suite", - "create", - "delete", - "deployment", - "deployment_status", - "fork", - "gollum", - "issue_comment", - "issues", - "label", - "member", - "milestone", - "page_build", - "project", - "project_card", - "project_column", - "public", - "pull_request", - "pull_request_review", - "pull_request_review_comment", - "push", - "registry_package", - "release", - "status", - "watch", - "repository_dispatch", - "workflow_dispatch", - "workflow_run" - ] - }, - "eventObject": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "additionalProperties": true - }, - "globs": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "minItems": 1, - "additionalItems": false - }, - "machine": { - "type": "string", - "enum": ["linux", "macos", "windows"] - }, - "name": { - "type": "string", - "pattern": "^[_a-zA-Z][a-zA-Z0-9_-]*$" - }, - "gitpermissionenums": { - "type": "string", - "enum": [ - "read", - "write", - "none" - ] - }, - "gitpermissions": { - "type": "object", - "properties": { - "actions" : { - "$ref": "#/definitions/gitpermissionenums" - }, - "checks" : { - "$ref": "#/definitions/gitpermissionenums" - }, - "contents": { - "$ref": "#/definitions/gitpermissionenums" - }, - "deployments": { - "$ref": "#/definitions/gitpermissionenums" - }, - "issues": { - "$ref": "#/definitions/gitpermissionenums" - }, - "packages": { - "$ref": "#/definitions/gitpermissionenums" - }, - "pull-requests": { - "$ref": "#/definitions/gitpermissionenums" - }, - "repository-projects": { - "$ref": "#/definitions/gitpermissionenums" - }, - "security-events": { - "$ref": "#/definitions/gitpermissionenums" - }, - "statuses": { - "$ref": "#/definitions/gitpermissionenums" - } - } - }, - "path": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths", - "$ref": "#/definitions/globs", - "description": "When using the push and pull_request events, you can configure a workflow to run when at least one file does not match paths-ignore or at least one modified file matches the configured paths. Path filters are not evaluated for pushes to tags.\nThe paths-ignore and paths keywords accept glob patterns that use the * and ** wildcard characters to match more than one path name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nYou can exclude paths using two types of filters. You cannot use both of these filters for the same event in a workflow.\n- paths-ignore - Use the paths-ignore filter when you only need to exclude path names.\n- paths - Use the paths filter when you need to filter paths for positive matches and exclude paths." - }, - "ref": { - "properties": { - "branches": { - "$ref": "#/definitions/branch" - }, - "branches-ignore": { - "$ref": "#/definitions/branch" - }, - "tags": { - "$ref": "#/definitions/branch" - }, - "tags-ignore": { - "$ref": "#/definitions/branch" - }, - "paths": { - "$ref": "#/definitions/path" - }, - "paths-ignore": { - "$ref": "#/definitions/path" - } - }, - "oneOf": [ - { - "type": "object", - "allOf": [ - { - "not": { - "required": ["branches", "branches-ignore"] - } - }, - { - "not": { - "required": ["tags", "tags-ignore"] - } - }, - { - "not": { - "required": ["paths", "paths-ignore"] - } - } - ] - }, - { - "type": "null" - } - ] - }, - "shell": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell", - "description": "You can override the default shell settings in the runner's operating system using the shell keyword. You can use built-in shell keywords, or you can define a custom set of shell options.", - "type": "string", - "anyOf": [ - { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#custom-shell" - }, - { - "enum": ["bash", "pwsh", "python", "sh", "cmd", "powershell"] - } - ] - }, - "types": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onevent_nametypes", - "description": "Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.\nYou can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.", - "type": "array", - "minItems": 1, - "additionalItems": false - }, - "working-directory": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun", - "description": "Using the working-directory keyword, you can specify the working directory of where to run the command.", - "type": "string" - } - }, - "properties": { - "name": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#name", - "description": "The name of your workflow. GitHub displays the names of your workflows on your repository's actions page. If you omit this field, GitHub sets the name to the workflow's filename.", - "type": "string" - }, - "on": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#on", - "description": "The name of the GitHub event that triggers the workflow. You can provide a single event 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. For a list of available events, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows.", - "oneOf": [ - { - "$ref": "#/definitions/event" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/event" - }, - "minItems": 1, - "additionalItems": false - }, - { - "type": "object", - "properties": { - "check_run": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-run-event-check_run", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the check_run event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/runs.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "rerequested", - "completed", - "requested_action" - ] - }, - "default": [ - "created", - "rerequested", - "completed", - "requested_action" - ] - } - } - }, - "check_suite": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-suite-event-check_suite", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the check_suite event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/suites/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["completed", "requested", "rerequested"] - }, - "default": ["completed", "requested", "rerequested"] - } - } - }, - "create": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#create-event-create", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone creates a branch or tag, which triggers the create event. For information about the REST API, see https://developer.github.com/v3/git/refs/#create-a-reference." - }, - "delete": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#delete-event-delete", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone deletes a branch or tag, which triggers the delete event. For information about the REST API, see https://developer.github.com/v3/git/refs/#delete-a-reference." - }, - "deployment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-event-deployment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone creates a deployment, which triggers the deployment event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/." - }, - "deployment_status": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-status-event-deployment_status", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime a third party provides a deployment status, which triggers the deployment_status event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status." - }, - "fork": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#fork-event-fork", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime when someone forks a repository, which triggers the fork event. For information about the REST API, see https://developer.github.com/v3/repos/forks/#create-a-fork." - }, - "gollum": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#gollum-event-gollum", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow when someone creates or updates a Wiki page, which triggers the gollum event." - }, - "issue_comment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issue-comment-event-issue_comment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the issue_comment event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/comments/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } - } - }, - "issues": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issues-event-issues", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the issues event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "opened", - "edited", - "deleted", - "transferred", - "pinned", - "unpinned", - "closed", - "reopened", - "assigned", - "unassigned", - "labeled", - "unlabeled", - "locked", - "unlocked", - "milestoned", - "demilestoned" - ] - }, - "default": [ - "opened", - "edited", - "deleted", - "transferred", - "pinned", - "unpinned", - "closed", - "reopened", - "assigned", - "unassigned", - "labeled", - "unlabeled", - "locked", - "unlocked", - "milestoned", - "demilestoned" - ] - } - } - }, - "label": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#label-event-label", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the label event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/labels/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } - } - }, - "member": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#member-event-member", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the member event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/collaborators/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["added", "edited", "deleted"] - }, - "default": ["added", "edited", "deleted"] - } - } - }, - "milestone": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#milestone-event-milestone", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the milestone event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/milestones/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "closed", "opened", "edited", "deleted"] - }, - "default": [ - "created", - "closed", - "opened", - "edited", - "deleted" - ] - } - } - }, - "page_build": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#page-build-event-page_build", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone pushes to a GitHub Pages-enabled branch, which triggers the page_build event. For information about the REST API, see https://developer.github.com/v3/repos/pages/." - }, - "project": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-event-project", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "updated", - "closed", - "reopened", - "edited", - "deleted" - ] - }, - "default": [ - "created", - "updated", - "closed", - "reopened", - "edited", - "deleted" - ] - } - } - }, - "project_card": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-card-event-project_card", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project_card event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/cards.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "moved", - "converted", - "edited", - "deleted" - ] - }, - "default": [ - "created", - "moved", - "converted", - "edited", - "deleted" - ] - } - } - }, - "project_column": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-column-event-project_column", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project_column event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/columns.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "updated", "moved", "deleted"] - }, - "default": ["created", "updated", "moved", "deleted"] - } - } - }, - "public": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#public-event-public", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone makes a private repository public, which triggers the public event. For information about the REST API, see https://developer.github.com/v3/repos/#edit." - }, - "pull_request": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-event-pull_request", - "$ref": "#/definitions/ref", - "description": "Runs your workflow anytime the pull_request event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "assigned", - "unassigned", - "labeled", - "unlabeled", - "opened", - "edited", - "closed", - "reopened", - "synchronize", - "ready_for_review", - "locked", - "unlocked", - "review_requested", - "review_request_removed" - ] - }, - "default": ["opened", "synchronize", "reopened"] - } - }, - "patternProperties": { - "^(branche|tag|path)s(-ignore)?$": { - "type": "array" - } - }, - "additionalProperties": false - }, - "pull_request_review": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-event-pull_request_review", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the pull_request_review event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/reviews.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["submitted", "edited", "dismissed"] - }, - "default": ["submitted", "edited", "dismissed"] - } - } - }, - "pull_request_review_comment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-comment-event-pull_request_review_comment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the pull_request_review_comment event. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/comments.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } - } - }, - "push": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#push-event-push", - "description": "Runs your workflow when someone pushes to a repository branch, which triggers the push event.\nNote: The webhook payload available to GitHub Actions does not include the added, removed, and modified attributes in the commit object. You can retrieve the full commit object using the REST API. For more information, see https://developer.github.com/v3/repos/commits/#get-a-single-commit.", - "type": "object", - "$ref": "#/definitions/ref", - "patternProperties": { - "^(branche|tag|path)s(-ignore)?$": { - "type": "array", - "items" : { - "type" : "string" - } - } - }, - "additionalProperties": false - }, - "pull_request_target": { - "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target", - "$ref": "#/definitions/ref", - "additionalProperties": false, - "description": "This event is similar to pull_request, except that it runs in the context of the base repository of the pull request, rather than in the merge commit. This means that you can more safely make your secrets available to the workflows triggered by the pull request, because only workflows defined in the commit on the base repository are run. For example, this event allows you to create workflows that label and comment on pull requests, based on the contents of the event payload.", - "patternProperties": { - "^(branche|tag|path)s(-ignore)?$": { - } - }, - "properties": { - "types": { - "$ref": "#/definitions/types", - "default": [ - "opened", - "synchronize", - "reopened" - ], - "items": { - "enum": [ - "assigned", - "unassigned", - "labeled", - "unlabeled", - "opened", - "edited", - "closed", - "reopened", - "synchronize", - "ready_for_review", - "locked", - "unlocked", - "review_requested", - "review_request_removed" - ], - "type": "string" - } - } - } - }, - "registry_package": { - "$comment": "https://help.github.com/en/actions/reference/events-that-trigger-workflows#registry-package-event-registry_package", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime a package is published or updated. For more information, see https://help.github.com/en/github/managing-packages-with-github-packages.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "default": [ - "published", - "updated" - ], - "items": { - "enum": [ - "published", - "updated" - ], - "type": "string" - } - } - } - }, - "release": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#release-event-release", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the release event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/releases/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "published", - "unpublished", - "created", - "edited", - "deleted", - "prereleased", - "released" - ] - }, - "default": [ - "published", - "unpublished", - "created", - "edited", - "deleted", - "prereleased", - "released" - ] - } - } - }, - "status": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#status-event-status", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the status of a Git commit changes, which triggers the status event. For information about the REST API, see https://developer.github.com/v3/repos/statuses/." - }, - "watch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#watch-event-watch", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the watch event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/activity/starring/." - }, - "repository_dispatch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#external-events-repository_dispatch", - "$ref": "#/definitions/eventObject", - "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. For more information, see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event.\nTo trigger the custom repository_dispatch webhook event, you must send a POST request to a GitHub API endpoint and provide an event_type name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the repository_dispatch event." - }, - "schedule": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule", - "description": "You can schedule a workflow to run at specific UTC times using POSIX cron syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). 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.\nNote: GitHub Actions does not support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly, and @reboot.\nYou can use crontab guru (https://crontab.guru/). to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of crontab guru examples (https://crontab.guru/examples.html).", - "type": "array", - "items": { - "type": "object", - "properties": { - "cron": { - "$comment": "https://stackoverflow.com/a/57639657/4044345", - "oneOf": [ - { - "pattern": "cron-(.)+" - } - ] - } - }, - "additionalProperties": false - }, - "minItems": 1, - "additionalItems": false - }, - "workflow_dispatch": { - "$comment": "https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/", - "description": "You can now create workflows that are manually triggered with the new workflow_dispatch event. You will then see a 'Run workflow' button on the Actions tab, enabling you to easily trigger a run.", - "properties": { - "inputs": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputs", - "description": "Input parameters allow you to specify data that the action expects to use during runtime. GitHub stores input parameters as environment variables. Input ids with uppercase letters are converted to lowercase during runtime. We recommended using lowercase input ids.", - "type": "object", - "patternProperties": { - "^[_a-zA-Z][a-zA-Z0-9_-]*$": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_id", - "description": "A string identifier to associate with the input. The value of is a map of the input's metadata. The must be a unique identifier within the inputs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", - "type": "object", - "properties": { - "description": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddescription", - "description": "A string description of the input parameter.", - "type": "string" - }, - "deprecationMessage": { - "description": "A string shown to users using the deprecated input.", - "type": "string" - }, - "required": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_idrequired", - "description": "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.", - "type": "boolean" - }, - "default": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddefault", - "description": "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file.", - "type": "string" - } - }, - "required": [ - "description", - "required" - ], - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - }, - "workflow_run": { - "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run", - "$ref": "#/definitions/eventObject", - "description": "This event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow. For example, if your pull_request workflow generates build artifacts, you can create a new workflow that uses workflow_run to analyze the results and add a comment to the original pull request.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "requested", - "completed" - ] - }, - "default": [ - "requested", - "completed" - ] - }, - "workflows": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - }, - "patternProperties": { - "^branches(-ignore)?$": {} - } - } - }, - "additionalProperties": false - } - ] - }, - "env": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env", - "$ref": "#/definitions/env", - "description": "A map of environment variables that are available to all jobs and steps in the workflow." - }, - "defaults": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaults", - "$ref": "#/definitions/defaults", - "description": "A map of default settings that will apply to all jobs in the workflow." - }, - "jobs": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobs", - "description": "A workflow run is made up of one or more jobs. Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the jobs..needs keyword.\nEach job runs in a fresh instance of the virtual environment specified by runs-on.\nYou can run an unlimited number of jobs as long as you are within the workflow usage limits. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#usage-limits.", - "type": "object", - "patternProperties": { - "^[_a-zA-Z][a-zA-Z0-9_-]*$": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_id", - "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 with a string that is unique to the jobs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", - "type": "object", - "properties": { - "name": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idname", - "description": "The name of the job displayed on GitHub.", - "type": "string" - }, - "needs": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idneeds", - "description": "Identifies 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 statement that causes the job to continue.", - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/name" - }, - "minItems": 1, - "additionalItems": false - }, - { - "$ref": "#/definitions/name" - } - ] - }, - "permissions" : { - "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idpermissions", - "description": "You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access", - "oneOf": [ - { - "const": "read-all|write-all" - }, - { - "type" : "object", - "$ref": "#/definitions/gitpermissions" - } - ] - }, - "runs-on": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on", - "description": "The type of machine to run the job on. The machine can be either a GitHub-hosted runner, or a self-hosted runner.", - "oneOf": [ - { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#github-hosted-runners", - "type": "string", - "enum": [ - "${{ matrix.os }}", - "macos-latest", - "macos-10.15", - "self-hosted", - "ubuntu-16.04", - "ubuntu-18.04", - "ubuntu-latest", - "windows-latest", - "windows-2019" - ] - }, - { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#self-hosted-runners", - "type": "array", - "oneOf": [ - { - "items": [ - { - "const": "self-hosted" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/machine" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/architecture" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/machine" - }, - { - "$ref": "#/definitions/architecture" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/architecture" - }, - { - "$ref": "#/definitions/machine" - } - ] - } - ], - "additionalItems": false - } - ] - }, - "outputs": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjobs_idoutputs", - "description": "A map of outputs for a job. Job outputs are available to all downstream jobs that depend on this job.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "minProperties": 1 - }, - "environment": { - "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idenvironment", - "$ref": "#/definitions/environment", - "description": "The environment that the job references" - }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idenv", - "$ref": "#/definitions/env", - "description": "A map of environment variables that are available to all steps in the job." - }, - "defaults": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaults", - "$ref": "#/definitions/defaults", - "description": "A map of default settings that will apply to all steps in the job." - }, - "if": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idif", - "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "steps": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps", - "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 virtual 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.\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid", - "description": "A unique identifier for the step. You can use the id to reference the step in contexts. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "if": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsif", - "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "name": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsname", - "description": "A name for your step to display on GitHub.", - "type": "string" - }, - "uses": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsuses", - "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 (https://hub.docker.com/).\nWe strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker tag number. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.\n- Using the commit SHA of a released action version is the safest for stability and security.\n- Using the specific major action version allows you to receive critical fixes and security patches while still maintaining compatibility. It also assures that your workflow should still work.\n- Using the master branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.\nSome actions require inputs that you must set using the with keyword. Review the action's README file to determine the inputs required.\nActions are either JavaScript files or Docker containers. If the action you're using is a Docker container you must run the job in a Linux virtual environment. For more details, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "type": "string" - }, - "run": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsrun", - "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.\nCommands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. For more information, see https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell.\nEach 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.", - "type": "string" - }, - "working-directory": { - "$ref": "#/definitions/working-directory" - }, - "shell": { - "$ref": "#/definitions/shell" - }, - "with": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswith", - "$ref": "#/definitions/env", - "description": "A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as environment variables. The variable is prefixed with INPUT_ and converted to upper case.", - "properties": { - "args": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithargs", - "type": "string" - }, - "entrypoint": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithentrypoint", - "type": "string" - } - } - }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv", - "$ref": "#/definitions/env", - "description": "Sets environment variables for steps to use in the virtual environment. You can also set environment variables for the entire workflow or a job." - }, - "continue-on-error": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error", - "description": "Prevents a job from failing when a step fails. Set to true to allow a job to pass when this step fails.", - "type": "boolean", - "default": false - }, - "timeout-minutes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes", - "description": "The maximum number of minutes to run the step before killing the process.", - "type": "number" - } - }, - "dependencies": { - "working-directory": ["run"], - "shell": ["run"] - }, - "additionalProperties": false - }, - "minItems": 1, - "additionalItems": false - }, - "timeout-minutes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes", - "description": "The maximum number of minutes to let a workflow run before GitHub automatically cancels it. Default: 360", - "type": "number", - "default": 360 - }, - "strategy": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy", - "description": "A strategy creates a build matrix for your jobs. You can define different variations of an environment to run each job in.", - "type": "object", - "properties": { - "matrix": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix", - "description": "A build matrix is a set of different configurations of the virtual environment. For example you might run a job against more than one supported version of a language, operating system, or tool. Each configuration is a copy of the job that runs and reports a status.\nYou can specify a matrix by supplying an array for the configuration options. For example, if the GitHub virtual environment supports Node.js versions 6, 8, and 10 you could specify an array of those versions in the matrix.\nWhen you define a matrix of operating systems, you must set the required runs-on keyword to the operating system of the current job, rather than hard-coding the operating system name. To access the operating system name, you can use the matrix.os context parameter to set runs-on. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "object", - "patternProperties": { - "^(in|ex)clude$": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/configuration" - } - }, - "minItems": 1, - "additionalItems": false - } - }, - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/configuration" - }, - "minItems": 1, - "additionalItems": false - }, - "minProperties": 1 - }, - "fail-fast": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast", - "description": "When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true", - "type": "boolean", - "default": true - }, - "max-parallel": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel", - "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 the available runners on GitHub-hosted virtual machines.", - "type": "number" - } - }, - "additionalProperties": false - }, - "continue-on-error": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error", - "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.", - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - }, - "container": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainer", - "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.\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.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/container" - } - ] - } - }, - "services": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idservices", - "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.\nWhen 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.\nWhen 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.\nWhen a step does not use a container action, you must access the service using localhost and bind the ports.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/container" - } - } - }, - "required": ["runs-on", "steps"], - "additionalProperties": false - } - }, - "minProperties": 1, - "additionalProperties": false - } - }, - "required": ["on", "jobs"], - "additionalProperties": false -} \ No newline at end of file From 0d582377a8cb22e2c5e9cf382b2a95a1e9349ffd Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Mon, 16 Aug 2021 16:48:34 +0530 Subject: [PATCH 44/61] using regex to check for octicon --- script/validate-data/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index 712efe1..720c85b 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -95,7 +95,7 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom workflowErrors.errors = res.errors.map(e => e.toString()) if (properties.iconName) { - if(!properties.iconName.startsWith("octicon ")) { + if(! /^octicon\s+/.test(properties.iconName)) { try { await fs.access(`../../icons/${properties.iconName}.svg`) } catch (e) { @@ -103,8 +103,8 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom } } else { - let iconName = properties.iconName.match(/octicon\s+(.*)/) - if(!iconName || !iconName[1] || iconName[1].length == 0) { + let iconName = properties.iconName.match(/^octicon\s+(.*)/) + if(!iconName || iconName[1].split(".")[0].length <= 0) { workflowErrors.errors.push(`No icon named ${properties.iconName} found`) } } From ccf813d3fbb1f88dc5576c4c0ad63507846cc97a Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Tue, 17 Aug 2021 10:09:53 +0530 Subject: [PATCH 45/61] using set instead of array --- script/validate-data/index.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index 720c85b..92b473e 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -42,7 +42,7 @@ const propertiesSchema = { async function checkWorkflows(folders: string[]): Promise { const result: WorkflowWithErrors[] = [] - const workflow_template_names : string[] = [] + const workflow_template_names = new Set() for (const folder of folders) { const dir = await fs.readdir(folder, { withFileTypes: true, @@ -56,13 +56,8 @@ async function checkWorkflows(folders: string[]): Promise const propertiesFilePath = join(folder, "properties", `${fileType}.properties.json`) const workflowWithErrors = await checkWorkflow(workflowFilePath, propertiesFilePath); - if(workflowWithErrors.name) { - if(workflow_template_names.includes(workflowWithErrors.name)) { - workflowWithErrors.errors.push(`Workflow template name "${workflowWithErrors.name}" already exists`) - } - else { - workflow_template_names.push(workflowWithErrors.name) - } + if(workflowWithErrors.name && workflow_template_names.size == workflow_template_names.add(workflowWithErrors.name).size) { + workflowWithErrors.errors.push(`Workflow template name "${workflowWithErrors.name}" already exists`) } if (workflowWithErrors.errors.length > 0) { result.push(workflowWithErrors) From 124226ff320d319386f638a0bcb5153b23c22335 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Tue, 17 Aug 2021 10:28:22 +0530 Subject: [PATCH 46/61] using trim to check for blank names --- script/validate-data/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/validate-data/index.ts b/script/validate-data/index.ts index 92b473e..8413653 100755 --- a/script/validate-data/index.ts +++ b/script/validate-data/index.ts @@ -82,7 +82,7 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string): Prom const propertiesFileContent = await fs.readFile(propertiesPath, "utf8") const properties: WorkflowProperties = JSON.parse(propertiesFileContent) - if(properties.name && properties.name.trim.length > 0) { + if(properties.name && properties.name.trim().length > 0) { workflowErrors.name = properties.name } let v = new validator(); From 9d67bbed4a718e099487d32a57c6f3dc515dedf7 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Tue, 17 Aug 2021 13:11:02 +0530 Subject: [PATCH 47/61] updating readme --- README.md | 20 +- script/validate-data/workflow-schema.json | 1244 --------------------- 2 files changed, 16 insertions(+), 1248 deletions(-) delete mode 100644 script/validate-data/workflow-schema.json diff --git a/README.md b/README.md index 2c2f1b5..67b3944 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ These are the workflow files for helping people get started with GitHub Actions. ### Directory structure -* [ci](ci): solutions for Continuous Integration +* [ci](ci): solutions for Continuous Integration and Deployments * [automation](automation): solutions for automating workflows. * [code-scanning](code-scanning): starter workflows for [Code Scanning](https://github.com/features/security) * [icons](icons): svg icons for the relevant template @@ -23,10 +23,22 @@ For example: `ci/django.yml` and `ci/properties/django.properties.json`. ### Valid properties -* `name`: the name shown in onboarding +* `name`: the name shown in onboarding. This property is unique within the repository. * `description`: the description shown in onboarding -* `iconName`: the icon name in the relevant folder, for example `django` should have an icon `icons/django.svg`. Only SVG is supported at this time -* `categories`: the categories that it will be shown under +* `iconName`: the icon name in the relevant folder, for example `django` should have an icon `icons/django.svg`. Only SVG is supported at this time. Another option is to use [octicon](https://primer.style/octicons/). The format to use an octicon is `octicon <>`. Example: `octicon person` +* `creator`: creator of the template shown in onboarding. All the workflow templates from an author will have the same `creator` field. +* `categories`: the list categories that it will be shown under. Choose atleast one category from the list [here](#categories). Further, choose the categories from the list of languages available [here](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). When a user views the available templates, those templates that match the same language will feature more prominently. + +### Categories +* continuous-integration +* deployment +* testing +* code-quality +* code-review +* dependency-management +* monitoring +* Automation +* utilities ### Variables These variables can be placed in the starter workflow and will be substituted as detailed below: diff --git a/script/validate-data/workflow-schema.json b/script/validate-data/workflow-schema.json deleted file mode 100644 index b3e7b8c..0000000 --- a/script/validate-data/workflow-schema.json +++ /dev/null @@ -1,1244 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions", - "definitions": { - "architecture": { - "type": "string", - "enum": ["ARM32", "x64", "x86"] - }, - "branch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestbranchestags", - "$ref": "#/definitions/globs", - "description": "When using the push and pull_request events, you can configure a workflow to run on specific branches or tags. If you only define only tags or only branches, the workflow won't run for events affecting the undefined Git ref.\nThe branches, branches-ignore, tags, and tags-ignore keywords accept glob patterns that use the * and ** wildcard characters to match more than one branch or tag name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nThe patterns defined in branches and tags are evaluated against the Git ref's name. For example, defining the pattern mona/octocat in branches will match the refs/heads/mona/octocat Git ref. The pattern releases/** will match the refs/heads/releases/10 Git ref.\nYou can use two types of filters to prevent a workflow from running on pushes and pull requests to tags and branches:\n- branches or branches-ignore - You cannot use both the branches and branches-ignore filters for the same event in a workflow. Use the branches filter when you need to filter branches for positive matches and exclude branches. Use the branches-ignore filter when you only need to exclude branch names.\n- tags or tags-ignore - You cannot use both the tags and tags-ignore filters for the same event in a workflow. Use the tags filter when you need to filter tags for positive matches and exclude tags. Use the tags-ignore filter when you only need to exclude tag names.\nYou can exclude tags and branches using the ! character. The order that you define patterns matters.\n- A matching negative pattern (prefixed with !) after a positive match will exclude the Git ref.\n- A matching positive pattern after a negative match will include the Git ref again." - }, - "configuration": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/configuration" - } - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/configuration" - }, - "additionalItems": false - } - ] - }, - "container": { - "type": "object", - "properties": { - "image": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerimage", - "description": "The Docker image to use as the container to run the action. The value can be the Docker Hub image name or a public docker registry name.", - "type": "string" - }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerenv", - "$ref": "#/definitions/env", - "description": "Sets an array of environment variables in the container." - }, - "ports": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerports", - "description": "Sets an array of ports to expose on the container.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 1, - "additionalItems": false - }, - "volumes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes", - "description": "Sets 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.\nTo specify a volume, you specify the source and destination path: :\nThe is a volume name or an absolute path on the host machine, and is an absolute path in the container.", - "type": "array", - "items": { - "type": "string", - "pattern": "^[^:]+:[^:]+$" - }, - "minItems": 1, - "additionalItems": false - }, - "options": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontaineroptions", - "description": "Additional Docker container resource options. For a list of options, see https://docs.docker.com/engine/reference/commandline/create/#options.", - "type": "string" - } - }, - "required": ["image"], - "additionalProperties": false - }, - "defaults": { - "type": "object", - "properties": { - "run": { - "type": "object", - "properties": { - "shell": { - "$ref": "#/definitions/shell" - }, - "working-directory": { - "$ref": "#/definitions/working-directory" - } - }, - "minProperties": 1, - "additionalProperties": false - } - }, - "minProperties": 1, - "additionalProperties": false - }, - "env": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - "minProperties": 1 - }, - "environment": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "name": {"type": "string"}, - "url": {"type": "string"} - } - } - ] - }, - "event": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows", - "type": "string", - "enum": [ - "check_run", - "check_suite", - "create", - "delete", - "deployment", - "deployment_status", - "fork", - "gollum", - "issue_comment", - "issues", - "label", - "member", - "milestone", - "page_build", - "project", - "project_card", - "project_column", - "public", - "pull_request", - "pull_request_review", - "pull_request_review_comment", - "push", - "registry_package", - "release", - "status", - "watch", - "repository_dispatch", - "workflow_dispatch", - "workflow_run" - ] - }, - "eventObject": { - "oneOf": [ - { - "type": "object" - }, - { - "type": "null" - } - ], - "additionalProperties": true - }, - "globs": { - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "minItems": 1, - "additionalItems": false - }, - "machine": { - "type": "string", - "enum": ["linux", "macos", "windows"] - }, - "name": { - "type": "string", - "pattern": "^[_a-zA-Z][a-zA-Z0-9_-]*$" - }, - "gitpermissionenums": { - "type": "string", - "enum": [ - "read", - "write", - "none" - ] - }, - "gitpermissions": { - "type": "object", - "properties": { - "actions" : { - "$ref": "#/definitions/gitpermissionenums" - }, - "checks" : { - "$ref": "#/definitions/gitpermissionenums" - }, - "contents": { - "$ref": "#/definitions/gitpermissionenums" - }, - "deployments": { - "$ref": "#/definitions/gitpermissionenums" - }, - "issues": { - "$ref": "#/definitions/gitpermissionenums" - }, - "packages": { - "$ref": "#/definitions/gitpermissionenums" - }, - "pull-requests": { - "$ref": "#/definitions/gitpermissionenums" - }, - "repository-projects": { - "$ref": "#/definitions/gitpermissionenums" - }, - "security-events": { - "$ref": "#/definitions/gitpermissionenums" - }, - "statuses": { - "$ref": "#/definitions/gitpermissionenums" - } - } - }, - "path": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths", - "$ref": "#/definitions/globs", - "description": "When using the push and pull_request events, you can configure a workflow to run when at least one file does not match paths-ignore or at least one modified file matches the configured paths. Path filters are not evaluated for pushes to tags.\nThe paths-ignore and paths keywords accept glob patterns that use the * and ** wildcard characters to match more than one path name. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet.\nYou can exclude paths using two types of filters. You cannot use both of these filters for the same event in a workflow.\n- paths-ignore - Use the paths-ignore filter when you only need to exclude path names.\n- paths - Use the paths filter when you need to filter paths for positive matches and exclude paths." - }, - "ref": { - "properties": { - "branches": { - "$ref": "#/definitions/branch" - }, - "branches-ignore": { - "$ref": "#/definitions/branch" - }, - "tags": { - "$ref": "#/definitions/branch" - }, - "tags-ignore": { - "$ref": "#/definitions/branch" - }, - "paths": { - "$ref": "#/definitions/path" - }, - "paths-ignore": { - "$ref": "#/definitions/path" - } - }, - "oneOf": [ - { - "type": "object", - "allOf": [ - { - "not": { - "required": ["branches", "branches-ignore"] - } - }, - { - "not": { - "required": ["tags", "tags-ignore"] - } - }, - { - "not": { - "required": ["paths", "paths-ignore"] - } - } - ] - }, - { - "type": "null" - } - ] - }, - "shell": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell", - "description": "You can override the default shell settings in the runner's operating system using the shell keyword. You can use built-in shell keywords, or you can define a custom set of shell options.", - "type": "string", - "anyOf": [ - { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#custom-shell" - }, - { - "enum": ["bash", "pwsh", "python", "sh", "cmd", "powershell"] - } - ] - }, - "types": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onevent_nametypes", - "description": "Selects the types of activity that will trigger a workflow run. Most GitHub events are triggered by more than one type of activity. For example, the event for the release resource is triggered when a release is published, unpublished, created, edited, deleted, or prereleased. The types keyword enables you to narrow down activity that causes the workflow to run. When only one activity type triggers a webhook event, the types keyword is unnecessary.\nYou can use an array of event types. For more information about each event and their activity types, see https://help.github.com/en/articles/events-that-trigger-workflows#webhook-events.", - "type": "array", - "minItems": 1, - "additionalItems": false - }, - "working-directory": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun", - "description": "Using the working-directory keyword, you can specify the working directory of where to run the command.", - "type": "string" - } - }, - "properties": { - "name": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#name", - "description": "The name of your workflow. GitHub displays the names of your workflows on your repository's actions page. If you omit this field, GitHub sets the name to the workflow's filename.", - "type": "string" - }, - "on": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#on", - "description": "The name of the GitHub event that triggers the workflow. You can provide a single event 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. For a list of available events, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows.", - "oneOf": [ - { - "$ref": "#/definitions/event" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/event" - }, - "minItems": 1, - "additionalItems": false - }, - { - "type": "object", - "properties": { - "check_run": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-run-event-check_run", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the check_run event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/runs.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "rerequested", - "completed", - "requested_action" - ] - }, - "default": [ - "created", - "rerequested", - "completed", - "requested_action" - ] - } - } - }, - "check_suite": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#check-suite-event-check_suite", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the check_suite event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/checks/suites/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["completed", "requested", "rerequested"] - }, - "default": ["completed", "requested", "rerequested"] - } - } - }, - "create": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#create-event-create", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone creates a branch or tag, which triggers the create event. For information about the REST API, see https://developer.github.com/v3/git/refs/#create-a-reference." - }, - "delete": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#delete-event-delete", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone deletes a branch or tag, which triggers the delete event. For information about the REST API, see https://developer.github.com/v3/git/refs/#delete-a-reference." - }, - "deployment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-event-deployment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone creates a deployment, which triggers the deployment event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/." - }, - "deployment_status": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#deployment-status-event-deployment_status", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime a third party provides a deployment status, which triggers the deployment_status event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see https://developer.github.com/v3/repos/deployments/#create-a-deployment-status." - }, - "fork": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#fork-event-fork", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime when someone forks a repository, which triggers the fork event. For information about the REST API, see https://developer.github.com/v3/repos/forks/#create-a-fork." - }, - "gollum": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#gollum-event-gollum", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow when someone creates or updates a Wiki page, which triggers the gollum event." - }, - "issue_comment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issue-comment-event-issue_comment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the issue_comment event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/comments/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } - } - }, - "issues": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#issues-event-issues", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the issues event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "opened", - "edited", - "deleted", - "transferred", - "pinned", - "unpinned", - "closed", - "reopened", - "assigned", - "unassigned", - "labeled", - "unlabeled", - "locked", - "unlocked", - "milestoned", - "demilestoned" - ] - }, - "default": [ - "opened", - "edited", - "deleted", - "transferred", - "pinned", - "unpinned", - "closed", - "reopened", - "assigned", - "unassigned", - "labeled", - "unlabeled", - "locked", - "unlocked", - "milestoned", - "demilestoned" - ] - } - } - }, - "label": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#label-event-label", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the label event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/labels/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } - } - }, - "member": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#member-event-member", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the member event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/collaborators/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["added", "edited", "deleted"] - }, - "default": ["added", "edited", "deleted"] - } - } - }, - "milestone": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#milestone-event-milestone", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the milestone event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/issues/milestones/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "closed", "opened", "edited", "deleted"] - }, - "default": [ - "created", - "closed", - "opened", - "edited", - "deleted" - ] - } - } - }, - "page_build": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#page-build-event-page_build", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone pushes to a GitHub Pages-enabled branch, which triggers the page_build event. For information about the REST API, see https://developer.github.com/v3/repos/pages/." - }, - "project": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-event-project", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "updated", - "closed", - "reopened", - "edited", - "deleted" - ] - }, - "default": [ - "created", - "updated", - "closed", - "reopened", - "edited", - "deleted" - ] - } - } - }, - "project_card": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-card-event-project_card", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project_card event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/cards.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "created", - "moved", - "converted", - "edited", - "deleted" - ] - }, - "default": [ - "created", - "moved", - "converted", - "edited", - "deleted" - ] - } - } - }, - "project_column": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#project-column-event-project_column", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the project_column event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/projects/columns.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "updated", "moved", "deleted"] - }, - "default": ["created", "updated", "moved", "deleted"] - } - } - }, - "public": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#public-event-public", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime someone makes a private repository public, which triggers the public event. For information about the REST API, see https://developer.github.com/v3/repos/#edit." - }, - "pull_request": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-event-pull_request", - "$ref": "#/definitions/ref", - "description": "Runs your workflow anytime the pull_request event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "assigned", - "unassigned", - "labeled", - "unlabeled", - "opened", - "edited", - "closed", - "reopened", - "synchronize", - "ready_for_review", - "locked", - "unlocked", - "review_requested", - "review_request_removed" - ] - }, - "default": ["opened", "synchronize", "reopened"] - } - }, - "patternProperties": { - "^(branche|tag|path)s(-ignore)?$": { - "type": "array" - } - }, - "additionalProperties": false - }, - "pull_request_review": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-event-pull_request_review", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the pull_request_review event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/reviews.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["submitted", "edited", "dismissed"] - }, - "default": ["submitted", "edited", "dismissed"] - } - } - }, - "pull_request_review_comment": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#pull-request-review-comment-event-pull_request_review_comment", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the pull_request_review_comment event. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/pulls/comments.\nNote: Workflows do not run on private base repositories when you open a pull request from a forked repository.\nWhen you create a pull request from a forked repository to the base repository, GitHub sends the pull_request event to the base repository and no pull request events occur on the forked repository.\nWorkflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.\nThe permissions for the GITHUB_TOKEN in forked repositories is read-only. For more information about the GITHUB_TOKEN, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": ["created", "edited", "deleted"] - }, - "default": ["created", "edited", "deleted"] - } - } - }, - "push": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#push-event-push", - "description": "Runs your workflow when someone pushes to a repository branch, which triggers the push event.\nNote: The webhook payload available to GitHub Actions does not include the added, removed, and modified attributes in the commit object. You can retrieve the full commit object using the REST API. For more information, see https://developer.github.com/v3/repos/commits/#get-a-single-commit.", - "type": "object", - "$ref": "#/definitions/ref", - "patternProperties": { - "^(branche|tag|path)s(-ignore)?$": { - "type": "array", - "items" : { - "type" : "string" - } - } - }, - "additionalProperties": false - }, - "pull_request_target": { - "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target", - "$ref": "#/definitions/ref", - "additionalProperties": false, - "description": "This event is similar to pull_request, except that it runs in the context of the base repository of the pull request, rather than in the merge commit. This means that you can more safely make your secrets available to the workflows triggered by the pull request, because only workflows defined in the commit on the base repository are run. For example, this event allows you to create workflows that label and comment on pull requests, based on the contents of the event payload.", - "patternProperties": { - "^(branche|tag|path)s(-ignore)?$": { - } - }, - "properties": { - "types": { - "$ref": "#/definitions/types", - "default": [ - "opened", - "synchronize", - "reopened" - ], - "items": { - "enum": [ - "assigned", - "unassigned", - "labeled", - "unlabeled", - "opened", - "edited", - "closed", - "reopened", - "synchronize", - "ready_for_review", - "locked", - "unlocked", - "review_requested", - "review_request_removed" - ], - "type": "string" - } - } - } - }, - "registry_package": { - "$comment": "https://help.github.com/en/actions/reference/events-that-trigger-workflows#registry-package-event-registry_package", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime a package is published or updated. For more information, see https://help.github.com/en/github/managing-packages-with-github-packages.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "default": [ - "published", - "updated" - ], - "items": { - "enum": [ - "published", - "updated" - ], - "type": "string" - } - } - } - }, - "release": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#release-event-release", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the release event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/repos/releases/.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "published", - "unpublished", - "created", - "edited", - "deleted", - "prereleased", - "released" - ] - }, - "default": [ - "published", - "unpublished", - "created", - "edited", - "deleted", - "prereleased", - "released" - ] - } - } - }, - "status": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#status-event-status", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the status of a Git commit changes, which triggers the status event. For information about the REST API, see https://developer.github.com/v3/repos/statuses/." - }, - "watch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#watch-event-watch", - "$ref": "#/definitions/eventObject", - "description": "Runs your workflow anytime the watch event occurs. More than one activity type triggers this event. For information about the REST API, see https://developer.github.com/v3/activity/starring/." - }, - "repository_dispatch": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#external-events-repository_dispatch", - "$ref": "#/definitions/eventObject", - "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. For more information, see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event.\nTo trigger the custom repository_dispatch webhook event, you must send a POST request to a GitHub API endpoint and provide an event_type name to describe the activity type. To trigger a workflow run, you must also configure your workflow to use the repository_dispatch event." - }, - "schedule": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule", - "description": "You can schedule a workflow to run at specific UTC times using POSIX cron syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07). 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.\nNote: GitHub Actions does not support the non-standard syntax @yearly, @monthly, @weekly, @daily, @hourly, and @reboot.\nYou can use crontab guru (https://crontab.guru/). to help generate your cron syntax and confirm what time it will run. To help you get started, there is also a list of crontab guru examples (https://crontab.guru/examples.html).", - "type": "array", - "items": { - "type": "object", - "properties": { - "cron": { - "$comment": "https://stackoverflow.com/a/57639657/4044345", - "oneOf": [ - { - "pattern": "cron-(.)+" - } - ] - } - }, - "additionalProperties": false - }, - "minItems": 1, - "additionalItems": false - }, - "workflow_dispatch": { - "$comment": "https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/", - "description": "You can now create workflows that are manually triggered with the new workflow_dispatch event. You will then see a 'Run workflow' button on the Actions tab, enabling you to easily trigger a run.", - "properties": { - "inputs": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputs", - "description": "Input parameters allow you to specify data that the action expects to use during runtime. GitHub stores input parameters as environment variables. Input ids with uppercase letters are converted to lowercase during runtime. We recommended using lowercase input ids.", - "type": "object", - "patternProperties": { - "^[_a-zA-Z][a-zA-Z0-9_-]*$": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_id", - "description": "A string identifier to associate with the input. The value of is a map of the input's metadata. The must be a unique identifier within the inputs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", - "type": "object", - "properties": { - "description": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddescription", - "description": "A string description of the input parameter.", - "type": "string" - }, - "deprecationMessage": { - "description": "A string shown to users using the deprecated input.", - "type": "string" - }, - "required": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_idrequired", - "description": "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.", - "type": "boolean" - }, - "default": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddefault", - "description": "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file.", - "type": "string" - } - }, - "required": [ - "description", - "required" - ], - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - }, - "workflow_run": { - "$comment": "https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run", - "$ref": "#/definitions/eventObject", - "description": "This event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow. For example, if your pull_request workflow generates build artifacts, you can create a new workflow that uses workflow_run to analyze the results and add a comment to the original pull request.", - "properties": { - "types": { - "$ref": "#/definitions/types", - "items": { - "type": "string", - "enum": [ - "requested", - "completed" - ] - }, - "default": [ - "requested", - "completed" - ] - }, - "workflows": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - }, - "patternProperties": { - "^branches(-ignore)?$": {} - } - } - }, - "additionalProperties": false - } - ] - }, - "env": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env", - "$ref": "#/definitions/env", - "description": "A map of environment variables that are available to all jobs and steps in the workflow." - }, - "defaults": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaults", - "$ref": "#/definitions/defaults", - "description": "A map of default settings that will apply to all jobs in the workflow." - }, - "jobs": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobs", - "description": "A workflow run is made up of one or more jobs. Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the jobs..needs keyword.\nEach job runs in a fresh instance of the virtual environment specified by runs-on.\nYou can run an unlimited number of jobs as long as you are within the workflow usage limits. For more information, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#usage-limits.", - "type": "object", - "patternProperties": { - "^[_a-zA-Z][a-zA-Z0-9_-]*$": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_id", - "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 with a string that is unique to the jobs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _.", - "type": "object", - "properties": { - "name": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idname", - "description": "The name of the job displayed on GitHub.", - "type": "string" - }, - "needs": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idneeds", - "description": "Identifies 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 statement that causes the job to continue.", - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/name" - }, - "minItems": 1, - "additionalItems": false - }, - { - "$ref": "#/definitions/name" - } - ] - }, - "permissions" : { - "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idpermissions", - "description": "You can modify the default permissions granted to the GITHUB_TOKEN, adding or removing access as required, so that you only allow the minimum required access", - "oneOf": [ - { - "const": "read-all|write-all" - }, - { - "type" : "object", - "$ref": "#/definitions/gitpermissions" - } - ] - }, - "runs-on": { - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idruns-on", - "description": "The type of machine to run the job on. The machine can be either a GitHub-hosted runner, or a self-hosted runner.", - "oneOf": [ - { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#github-hosted-runners", - "type": "string", - "enum": [ - "${{ matrix.os }}", - "macos-latest", - "macos-10.15", - "self-hosted", - "ubuntu-16.04", - "ubuntu-18.04", - "ubuntu-latest", - "windows-latest", - "windows-2019" - ] - }, - { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#self-hosted-runners", - "type": "array", - "oneOf": [ - { - "items": [ - { - "const": "self-hosted" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/machine" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/architecture" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/machine" - }, - { - "$ref": "#/definitions/architecture" - } - ] - }, - { - "items": [ - { - "const": "self-hosted" - }, - { - "$ref": "#/definitions/architecture" - }, - { - "$ref": "#/definitions/machine" - } - ] - } - ], - "additionalItems": false - } - ] - }, - "outputs": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjobs_idoutputs", - "description": "A map of outputs for a job. Job outputs are available to all downstream jobs that depend on this job.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "minProperties": 1 - }, - "environment": { - "$comment": "https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idenvironment", - "$ref": "#/definitions/environment", - "description": "The environment that the job references" - }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idenv", - "$ref": "#/definitions/env", - "description": "A map of environment variables that are available to all steps in the job." - }, - "defaults": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_iddefaults", - "$ref": "#/definitions/defaults", - "description": "A map of default settings that will apply to all steps in the job." - }, - "if": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idif", - "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "steps": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idsteps", - "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 virtual 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.\n", - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid", - "description": "A unique identifier for the step. You can use the id to reference the step in contexts. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "if": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsif", - "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.\nExpressions in an if conditional do not require the ${{ }} syntax. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "string" - }, - "name": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsname", - "description": "A name for your step to display on GitHub.", - "type": "string" - }, - "uses": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsuses", - "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 (https://hub.docker.com/).\nWe strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA, or Docker tag number. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.\n- Using the commit SHA of a released action version is the safest for stability and security.\n- Using the specific major action version allows you to receive critical fixes and security patches while still maintaining compatibility. It also assures that your workflow should still work.\n- Using the master branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.\nSome actions require inputs that you must set using the with keyword. Review the action's README file to determine the inputs required.\nActions are either JavaScript files or Docker containers. If the action you're using is a Docker container you must run the job in a Linux virtual environment. For more details, see https://help.github.com/en/articles/virtual-environments-for-github-actions.", - "type": "string" - }, - "run": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsrun", - "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.\nCommands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. For more information, see https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell.\nEach 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.", - "type": "string" - }, - "working-directory": { - "$ref": "#/definitions/working-directory" - }, - "shell": { - "$ref": "#/definitions/shell" - }, - "with": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswith", - "$ref": "#/definitions/env", - "description": "A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as environment variables. The variable is prefixed with INPUT_ and converted to upper case.", - "properties": { - "args": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithargs", - "type": "string" - }, - "entrypoint": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepswithentrypoint", - "type": "string" - } - } - }, - "env": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv", - "$ref": "#/definitions/env", - "description": "Sets environment variables for steps to use in the virtual environment. You can also set environment variables for the entire workflow or a job." - }, - "continue-on-error": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error", - "description": "Prevents a job from failing when a step fails. Set to true to allow a job to pass when this step fails.", - "type": "boolean", - "default": false - }, - "timeout-minutes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes", - "description": "The maximum number of minutes to run the step before killing the process.", - "type": "number" - } - }, - "dependencies": { - "working-directory": ["run"], - "shell": ["run"] - }, - "additionalProperties": false - }, - "minItems": 1, - "additionalItems": false - }, - "timeout-minutes": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes", - "description": "The maximum number of minutes to let a workflow run before GitHub automatically cancels it. Default: 360", - "type": "number", - "default": 360 - }, - "strategy": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy", - "description": "A strategy creates a build matrix for your jobs. You can define different variations of an environment to run each job in.", - "type": "object", - "properties": { - "matrix": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix", - "description": "A build matrix is a set of different configurations of the virtual environment. For example you might run a job against more than one supported version of a language, operating system, or tool. Each configuration is a copy of the job that runs and reports a status.\nYou can specify a matrix by supplying an array for the configuration options. For example, if the GitHub virtual environment supports Node.js versions 6, 8, and 10 you could specify an array of those versions in the matrix.\nWhen you define a matrix of operating systems, you must set the required runs-on keyword to the operating system of the current job, rather than hard-coding the operating system name. To access the operating system name, you can use the matrix.os context parameter to set runs-on. For more information, see https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions.", - "type": "object", - "patternProperties": { - "^(in|ex)clude$": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/configuration" - } - }, - "minItems": 1, - "additionalItems": false - } - }, - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/configuration" - }, - "minItems": 1, - "additionalItems": false - }, - "minProperties": 1 - }, - "fail-fast": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast", - "description": "When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true", - "type": "boolean", - "default": true - }, - "max-parallel": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel", - "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 the available runners on GitHub-hosted virtual machines.", - "type": "number" - } - }, - "additionalProperties": false - }, - "continue-on-error": { - "$comment": "https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error", - "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.", - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string" - } - ] - }, - "container": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainer", - "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.\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.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/container" - } - ] - } - }, - "services": { - "$comment": "https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idservices", - "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.\nWhen 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.\nWhen 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.\nWhen a step does not use a container action, you must access the service using localhost and bind the ports.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/container" - } - } - }, - "required": ["runs-on", "steps"], - "additionalProperties": false - } - }, - "minProperties": 1, - "additionalProperties": false - } - }, - "required": ["on", "jobs"], - "additionalProperties": false -} \ No newline at end of file From 68b47b8e02dd3a52c7734255305a788590452dd8 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Tue, 17 Aug 2021 14:08:33 +0530 Subject: [PATCH 48/61] fixing typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67b3944..da863fe 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ For example: `ci/django.yml` and `ci/properties/django.properties.json`. * `description`: the description shown in onboarding * `iconName`: the icon name in the relevant folder, for example `django` should have an icon `icons/django.svg`. Only SVG is supported at this time. Another option is to use [octicon](https://primer.style/octicons/). The format to use an octicon is `octicon <>`. Example: `octicon person` * `creator`: creator of the template shown in onboarding. All the workflow templates from an author will have the same `creator` field. -* `categories`: the list categories that it will be shown under. Choose atleast one category from the list [here](#categories). Further, choose the categories from the list of languages available [here](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). When a user views the available templates, those templates that match the same language will feature more prominently. +* `categories`: the categories that it will be shown under. Choose at least one category from the list [here](#categories). Further, choose the categories from the list of languages available [here](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). When a user views the available templates, those templates that match the same language will feature more prominently. ### Categories * continuous-integration From be437f0ba596ba083693bc5a928c5bf6f40fda88 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Tue, 17 Aug 2021 14:09:22 +0530 Subject: [PATCH 49/61] fixing typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da863fe..4b5b9f8 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ For example: `ci/django.yml` and `ci/properties/django.properties.json`. * `name`: the name shown in onboarding. This property is unique within the repository. * `description`: the description shown in onboarding -* `iconName`: the icon name in the relevant folder, for example `django` should have an icon `icons/django.svg`. Only SVG is supported at this time. Another option is to use [octicon](https://primer.style/octicons/). The format to use an octicon is `octicon <>`. Example: `octicon person` +* `iconName`: the icon name in the relevant folder, for example, `django` should have an icon `icons/django.svg`. Only SVG is supported at this time. Another option is to use [octicon](https://primer.style/octicons/). The format to use an octicon is `octicon <>`. Example: `octicon person` * `creator`: creator of the template shown in onboarding. All the workflow templates from an author will have the same `creator` field. * `categories`: the categories that it will be shown under. Choose at least one category from the list [here](#categories). Further, choose the categories from the list of languages available [here](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). When a user views the available templates, those templates that match the same language will feature more prominently. From 8bec7d688737fc8c71bd141d429b55f2ced9065c Mon Sep 17 00:00:00 2001 From: rui Date: Wed, 18 Aug 2021 19:28:16 -0400 Subject: [PATCH 50/61] go: use go1.17 (#1045) Signed-off-by: Rui Chen Co-authored-by: Josh Gross --- ci/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/go.yml b/ci/go.yml index 22a110a..afff652 100644 --- a/ci/go.yml +++ b/ci/go.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Build run: go build -v ./... From 07d3c6475745417e7b9c26f6689876ccf11675ab Mon Sep 17 00:00:00 2001 From: Robin Neatherway Date: Thu, 19 Aug 2021 12:42:33 +0100 Subject: [PATCH 51/61] Minor grammar fix --- code-scanning/properties/devskim.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-scanning/properties/devskim.properties.json b/code-scanning/properties/devskim.properties.json index 0eab5c6..40fd52b 100644 --- a/code-scanning/properties/devskim.properties.json +++ b/code-scanning/properties/devskim.properties.json @@ -1,7 +1,7 @@ { "name": "DevSkim", "creator": "Microsoft CST-E", - "description": "DevSkim is security linter that highlights common security issues in source code.", + "description": "DevSkim is a security linter that highlights common security issues in source code.", "iconName": "cst-logo", "categories": ["Code Scanning", "C", "C#", "C++", "Go", "Java", "JavaScript", "TypeScript", "Python", "Powershell", "Cobol", "Objective C", "PHP", "Ruby", "Rust", "SQL", "Swift", "Visual Basic"] } From 671fc9a635ceb98715aa869d6172317da7bb3b33 Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Mon, 23 Aug 2021 11:00:59 +0530 Subject: [PATCH 52/61] deployment as a category in properties.json --- ci/properties/alibabacloud.properties.json | 2 +- ci/properties/aws.properties.json | 2 +- ci/properties/azure.properties.json | 2 +- ci/properties/google.properties.json | 2 +- ci/properties/ibm.properties.json | 2 +- ci/properties/openshift.properties.json | 2 +- ci/properties/tencent.properties.json | 2 +- ci/properties/terraform.properties.json | 2 +- script/sync-ghes/index.ts | 15 +++++++++------ script/sync-ghes/settings.json | 10 ++++++++++ 10 files changed, 27 insertions(+), 14 deletions(-) diff --git a/ci/properties/alibabacloud.properties.json b/ci/properties/alibabacloud.properties.json index bbee6df..f1e33f2 100644 --- a/ci/properties/alibabacloud.properties.json +++ b/ci/properties/alibabacloud.properties.json @@ -3,5 +3,5 @@ "description": "Deploy a container to Alibaba Cloud Container Service for Kubernetes (ACK).", "creator": "Alibaba Cloud", "iconName": "alibabacloud", - "categories": null + "categories": ["deployment"] } diff --git a/ci/properties/aws.properties.json b/ci/properties/aws.properties.json index b80775f..33c3064 100644 --- a/ci/properties/aws.properties.json +++ b/ci/properties/aws.properties.json @@ -3,5 +3,5 @@ "description": "Deploy a container to an Amazon ECS service powered by AWS Fargate or Amazon EC2.", "creator": "Amazon Web Services", "iconName": "aws", - "categories": null + "categories": ["deployment"] } \ No newline at end of file diff --git a/ci/properties/azure.properties.json b/ci/properties/azure.properties.json index fd9d0d8..4970936 100644 --- a/ci/properties/azure.properties.json +++ b/ci/properties/azure.properties.json @@ -3,5 +3,5 @@ "description": "Build a Node.js project and deploy it to an Azure Web App.", "creator": "Microsoft Azure", "iconName": "azure", - "categories": null + "categories": ["deployment"] } \ No newline at end of file diff --git a/ci/properties/google.properties.json b/ci/properties/google.properties.json index e2d917d..ed69c5e 100644 --- a/ci/properties/google.properties.json +++ b/ci/properties/google.properties.json @@ -3,5 +3,5 @@ "description": "Build a docker container, publish it to Google Container Registry, and deploy to GKE.", "creator": "Google Cloud", "iconName": "googlegke", - "categories": null + "categories": ["deployment"] } \ No newline at end of file diff --git a/ci/properties/ibm.properties.json b/ci/properties/ibm.properties.json index cfd0383..0c1efdc 100644 --- a/ci/properties/ibm.properties.json +++ b/ci/properties/ibm.properties.json @@ -3,5 +3,5 @@ "description": "Build a docker container, publish it to IBM Cloud Container Registry, and deploy to IBM Cloud Kubernetes Service.", "creator": "IBM", "iconName": "ibm", - "categories": null + "categories": ["deployment"] } \ No newline at end of file diff --git a/ci/properties/openshift.properties.json b/ci/properties/openshift.properties.json index 53538c7..d500aa9 100644 --- a/ci/properties/openshift.properties.json +++ b/ci/properties/openshift.properties.json @@ -3,5 +3,5 @@ "description": "Build a Docker-based project and deploy it to OpenShift.", "creator": "Red Hat", "iconName": "openshift", - "categories": [ "Dockerfile" ] + "categories": [ "deployment", "Dockerfile" ] } diff --git a/ci/properties/tencent.properties.json b/ci/properties/tencent.properties.json index ba579a1..465073e 100644 --- a/ci/properties/tencent.properties.json +++ b/ci/properties/tencent.properties.json @@ -3,5 +3,5 @@ "description": "This workflow will build a docker container, publish and deploy it to Tencent Kubernetes Engine (TKE).", "creator": "Tencent Cloud", "iconName": "tencentcloud", - "categories": null + "categories": ["deployment"] } \ No newline at end of file diff --git a/ci/properties/terraform.properties.json b/ci/properties/terraform.properties.json index bfeabdf..9929d33 100644 --- a/ci/properties/terraform.properties.json +++ b/ci/properties/terraform.properties.json @@ -3,5 +3,5 @@ "description": "Set up Terraform CLI in your GitHub Actions workflow.", "creator": "HashiCorp", "iconName": "terraform", - "categories": null + "categories": ["deployment"] } diff --git a/script/sync-ghes/index.ts b/script/sync-ghes/index.ts index 0fa3440..ea67432 100755 --- a/script/sync-ghes/index.ts +++ b/script/sync-ghes/index.ts @@ -19,6 +19,8 @@ interface WorkflowProperties { iconName?: string; categories: string[] | null; + + creator?: string; } interface WorkflowsCheckResult { @@ -28,12 +30,14 @@ interface WorkflowsCheckResult { async function checkWorkflows( folders: string[], - enabledActions: string[] + enabledActions: string[], + partners: string[] ): Promise { const result: WorkflowsCheckResult = { compatibleWorkflows: [], incompatibleWorkflows: [], }; + const partnersSet = new Set(partners.map((x) => x.toLowerCase())); for (const folder of folders) { const dir = await fs.readdir(folder, { @@ -51,11 +55,10 @@ async function checkWorkflows( )); const iconName: string | undefined = workflowProperties["iconName"]; - const isBlankTemplate = workflowId === "blank"; - const partnerWorkflow = workflowProperties.categories === null; + const partnerWorkflow = workflowProperties.creator ? partnersSet.has(workflowProperties.creator.toLowerCase()) : false; const enabled = - (isBlankTemplate || !partnerWorkflow) && + !partnerWorkflow && (await checkWorkflow(workflowFilePath, enabledActions)); const workflowDesc: WorkflowDesc = { @@ -90,7 +93,6 @@ async function checkWorkflow( ): Promise { // Create set with lowercase action names for easier, case-insensitive lookup const enabledActionsSet = new Set(enabledActions.map((x) => x.toLowerCase())); - try { const workflowFileContent = await fs.readFile(workflowPath, "utf8"); const workflow = safeLoad(workflowFileContent); @@ -126,7 +128,8 @@ async function checkWorkflow( const result = await checkWorkflows( settings.folders, - settings.enabledActions + settings.enabledActions, + settings.partners ); console.group( diff --git a/script/sync-ghes/settings.json b/script/sync-ghes/settings.json index 050ea0a..60b70ed 100644 --- a/script/sync-ghes/settings.json +++ b/script/sync-ghes/settings.json @@ -16,5 +16,15 @@ "actions/starter-workflows", "actions/upload-artifact", "actions/upload-release-asset" + ], + "partners": [ + "Alibaba Cloud", + "Amazon Web Services", + "Microsoft Azure", + "Google Cloud", + "IBM", + "Red Hat", + "Tencent Cloud", + "HashiCorp" ] } From b2ac199660644065c2468dbf53cf85811f6d07de Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Mon, 23 Aug 2021 11:08:57 +0530 Subject: [PATCH 53/61] reordering categories --- ci/properties/openshift.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/openshift.properties.json b/ci/properties/openshift.properties.json index d500aa9..1bc2eca 100644 --- a/ci/properties/openshift.properties.json +++ b/ci/properties/openshift.properties.json @@ -3,5 +3,5 @@ "description": "Build a Docker-based project and deploy it to OpenShift.", "creator": "Red Hat", "iconName": "openshift", - "categories": [ "deployment", "Dockerfile" ] + "categories": ["Dockerfile","deployment" ] } From f5724905e59be4fea1e9005c20734660e07c36fe Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Mon, 23 Aug 2021 12:47:22 +0530 Subject: [PATCH 54/61] capitalizing category --- ci/properties/alibabacloud.properties.json | 2 +- ci/properties/aws.properties.json | 2 +- ci/properties/azure.properties.json | 2 +- ci/properties/google.properties.json | 2 +- ci/properties/ibm.properties.json | 2 +- ci/properties/openshift.properties.json | 2 +- ci/properties/tencent.properties.json | 2 +- ci/properties/terraform.properties.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/properties/alibabacloud.properties.json b/ci/properties/alibabacloud.properties.json index f1e33f2..1ce285f 100644 --- a/ci/properties/alibabacloud.properties.json +++ b/ci/properties/alibabacloud.properties.json @@ -3,5 +3,5 @@ "description": "Deploy a container to Alibaba Cloud Container Service for Kubernetes (ACK).", "creator": "Alibaba Cloud", "iconName": "alibabacloud", - "categories": ["deployment"] + "categories": ["Deployment"] } diff --git a/ci/properties/aws.properties.json b/ci/properties/aws.properties.json index 33c3064..10a7ed3 100644 --- a/ci/properties/aws.properties.json +++ b/ci/properties/aws.properties.json @@ -3,5 +3,5 @@ "description": "Deploy a container to an Amazon ECS service powered by AWS Fargate or Amazon EC2.", "creator": "Amazon Web Services", "iconName": "aws", - "categories": ["deployment"] + "categories": ["Deployment"] } \ No newline at end of file diff --git a/ci/properties/azure.properties.json b/ci/properties/azure.properties.json index 4970936..362d5d1 100644 --- a/ci/properties/azure.properties.json +++ b/ci/properties/azure.properties.json @@ -3,5 +3,5 @@ "description": "Build a Node.js project and deploy it to an Azure Web App.", "creator": "Microsoft Azure", "iconName": "azure", - "categories": ["deployment"] + "categories": ["Deployment"] } \ No newline at end of file diff --git a/ci/properties/google.properties.json b/ci/properties/google.properties.json index ed69c5e..c7f216f 100644 --- a/ci/properties/google.properties.json +++ b/ci/properties/google.properties.json @@ -3,5 +3,5 @@ "description": "Build a docker container, publish it to Google Container Registry, and deploy to GKE.", "creator": "Google Cloud", "iconName": "googlegke", - "categories": ["deployment"] + "categories": ["Deployment"] } \ No newline at end of file diff --git a/ci/properties/ibm.properties.json b/ci/properties/ibm.properties.json index 0c1efdc..4219690 100644 --- a/ci/properties/ibm.properties.json +++ b/ci/properties/ibm.properties.json @@ -3,5 +3,5 @@ "description": "Build a docker container, publish it to IBM Cloud Container Registry, and deploy to IBM Cloud Kubernetes Service.", "creator": "IBM", "iconName": "ibm", - "categories": ["deployment"] + "categories": ["Deployment"] } \ No newline at end of file diff --git a/ci/properties/openshift.properties.json b/ci/properties/openshift.properties.json index 1bc2eca..54948c2 100644 --- a/ci/properties/openshift.properties.json +++ b/ci/properties/openshift.properties.json @@ -3,5 +3,5 @@ "description": "Build a Docker-based project and deploy it to OpenShift.", "creator": "Red Hat", "iconName": "openshift", - "categories": ["Dockerfile","deployment" ] + "categories": ["Dockerfile","Deployment" ] } diff --git a/ci/properties/tencent.properties.json b/ci/properties/tencent.properties.json index 465073e..32d0da7 100644 --- a/ci/properties/tencent.properties.json +++ b/ci/properties/tencent.properties.json @@ -3,5 +3,5 @@ "description": "This workflow will build a docker container, publish and deploy it to Tencent Kubernetes Engine (TKE).", "creator": "Tencent Cloud", "iconName": "tencentcloud", - "categories": ["deployment"] + "categories": ["Deployment"] } \ No newline at end of file diff --git a/ci/properties/terraform.properties.json b/ci/properties/terraform.properties.json index 9929d33..12afabe 100644 --- a/ci/properties/terraform.properties.json +++ b/ci/properties/terraform.properties.json @@ -3,5 +3,5 @@ "description": "Set up Terraform CLI in your GitHub Actions workflow.", "creator": "HashiCorp", "iconName": "terraform", - "categories": ["deployment"] + "categories": ["Deployment"] } From e56cb5c21591a7ad820f6c22de2e7d212ead898b Mon Sep 17 00:00:00 2001 From: aparna-ravindra Date: Tue, 24 Aug 2021 10:28:09 +0530 Subject: [PATCH 55/61] renaming variable --- script/sync-ghes/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/sync-ghes/index.ts b/script/sync-ghes/index.ts index ea67432..e37eca3 100755 --- a/script/sync-ghes/index.ts +++ b/script/sync-ghes/index.ts @@ -55,10 +55,10 @@ async function checkWorkflows( )); const iconName: string | undefined = workflowProperties["iconName"]; - const partnerWorkflow = workflowProperties.creator ? partnersSet.has(workflowProperties.creator.toLowerCase()) : false; + const isPartnerWorkflow = workflowProperties.creator ? partnersSet.has(workflowProperties.creator.toLowerCase()) : false; const enabled = - !partnerWorkflow && + !isPartnerWorkflow && (await checkWorkflow(workflowFilePath, enabledActions)); const workflowDesc: WorkflowDesc = { From 7f3356b05c1b9819637ee9f05e560c498d923489 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 24 Aug 2021 17:31:06 +0300 Subject: [PATCH 56/61] update android, gradle and maven workflows to use caching from setup-java --- ci/android.yml | 1 + ci/gradle.yml | 3 ++- ci/maven.yml | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/android.yml b/ci/android.yml index 4bbc689..3037b9f 100644 --- a/ci/android.yml +++ b/ci/android.yml @@ -18,6 +18,7 @@ jobs: with: java-version: '11' distribution: 'adopt' + cache: gradle - name: Grant execute permission for gradlew run: chmod +x gradlew diff --git a/ci/gradle.yml b/ci/gradle.yml index 6e7e922..282983b 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -1,4 +1,4 @@ -# This workflow will build a Java project with Gradle +# This workflow will build a Java project with Gradle, cache/restore dependecies # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle name: Java CI with Gradle @@ -21,6 +21,7 @@ jobs: with: java-version: '11' distribution: 'adopt' + cache: gradle - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle diff --git a/ci/maven.yml b/ci/maven.yml index 923425b..90ffc0a 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -1,4 +1,4 @@ -# This workflow will build a Java project with Maven +# This workflow will build a Java project with Maven, cache/restore dependecies # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven name: Java CI with Maven @@ -21,5 +21,6 @@ jobs: with: java-version: '11' distribution: 'adopt' + cache: maven - name: Build with Maven run: mvn -B package --file pom.xml From 138cc494633c38a75c8fb68b7b5ed40ebd7b27b0 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 24 Aug 2021 18:25:52 +0300 Subject: [PATCH 57/61] fix documentation for gradle and maven --- ci/gradle.yml | 2 +- ci/maven.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/gradle.yml b/ci/gradle.yml index 282983b..5ecabba 100644 --- a/ci/gradle.yml +++ b/ci/gradle.yml @@ -1,4 +1,4 @@ -# This workflow will build a Java project with Gradle, cache/restore dependecies +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle name: Java CI with Gradle diff --git a/ci/maven.yml b/ci/maven.yml index 90ffc0a..ac3b6de 100644 --- a/ci/maven.yml +++ b/ci/maven.yml @@ -1,4 +1,4 @@ -# This workflow will build a Java project with Maven, cache/restore dependecies +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven name: Java CI with Maven From 680b06affc863e6706b2b56707385cfc4c9534a4 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari <64764738+tiwarishub@users.noreply.github.com> Date: Wed, 25 Aug 2021 00:13:11 +0530 Subject: [PATCH 58/61] Update node.js.properties.json --- ci/properties/node.js.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/node.js.properties.json b/ci/properties/node.js.properties.json index 6ab4c53..d584575 100644 --- a/ci/properties/node.js.properties.json +++ b/ci/properties/node.js.properties.json @@ -2,5 +2,5 @@ "name": "Node.js", "description": "Build and test a Node.js project with npm.", "iconName": "nodejs", - "categories": ["JavaScript", "Node", "Npm"] + "categories": ["JavaScript", "Node", "npm"] } From e4eea0ea9c76248066af2849e9890460016f4454 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari <64764738+tiwarishub@users.noreply.github.com> Date: Wed, 25 Aug 2021 00:17:17 +0530 Subject: [PATCH 59/61] Update npm-publish.properties.json --- ci/properties/npm-publish.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/npm-publish.properties.json b/ci/properties/npm-publish.properties.json index d253373..764dbf3 100644 --- a/ci/properties/npm-publish.properties.json +++ b/ci/properties/npm-publish.properties.json @@ -2,5 +2,5 @@ "name": "Publish Node.js Package", "description": "Publishes a Node.js package to npm and GitHub Packages.", "iconName": "node-package-transparent", - "categories": ["JavaScript", "SDLC"] + "categories": ["JavaScript", "npm"] } From 973d29b6bf4000cbcfb47cb1b15ecf1fb42b4099 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari <64764738+tiwarishub@users.noreply.github.com> Date: Wed, 25 Aug 2021 00:17:39 +0530 Subject: [PATCH 60/61] Update gem-push.properties.json --- ci/properties/gem-push.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/gem-push.properties.json b/ci/properties/gem-push.properties.json index c54e7b5..188d80a 100644 --- a/ci/properties/gem-push.properties.json +++ b/ci/properties/gem-push.properties.json @@ -2,5 +2,5 @@ "name": "Ruby Gem", "description": "Pushes a Ruby Gem to RubyGems and GitHub Package Registry.", "iconName": "ruby-gems", - "categories": ["Ruby", "SDLC"] + "categories": ["Ruby"] } From bb64945011c8c6fc09e043d4e1ac5c87567efb16 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari <64764738+tiwarishub@users.noreply.github.com> Date: Wed, 25 Aug 2021 00:31:52 +0530 Subject: [PATCH 61/61] Update node.js.properties.json --- ci/properties/node.js.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/properties/node.js.properties.json b/ci/properties/node.js.properties.json index d584575..557222a 100644 --- a/ci/properties/node.js.properties.json +++ b/ci/properties/node.js.properties.json @@ -2,5 +2,5 @@ "name": "Node.js", "description": "Build and test a Node.js project with npm.", "iconName": "nodejs", - "categories": ["JavaScript", "Node", "npm"] + "categories": ["JavaScript", "npm"] }