Skip to content

Commit

Permalink
fix(gha): Update GitHub Actions Workflow Schema #5742 (#5759)
Browse files Browse the repository at this point in the history
* add run-name to github actions schema

* remove unsupported check_suite event types

* remove unsupported member event type

* remove unsupported project updated event type

* move run-name into existing test resrouce
  • Loading branch information
bakosa authored Nov 21, 2023
1 parent 3dbc9fa commit 21375fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
24 changes: 6 additions & 18 deletions checkov/github_actions/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,11 @@
"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"
},
"run-name": {
"$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#run-name",
"description": "A name for your workflow run. You can use the name to filter job runs in the dashboard and in the REST API.",
"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.",
Expand Down Expand Up @@ -1645,7 +1650,7 @@
"$ref": "#/definitions/types",
"items": {
"type": "string",
"enum": ["completed", "requested", "rerequested"]
"enum": ["completed"]
},
"default": ["completed", "requested", "rerequested"]
}
Expand Down Expand Up @@ -1818,21 +1823,6 @@
}
}
},
"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"]
}
}
},
"merge_group": {
"$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows#merge_group",
"$ref": "#/definitions/eventObject",
Expand Down Expand Up @@ -1885,7 +1875,6 @@
"type": "string",
"enum": [
"created",
"updated",
"closed",
"reopened",
"edited",
Expand All @@ -1894,7 +1883,6 @@
},
"default": [
"created",
"updated",
"closed",
"reopened",
"edited",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI
run-name: "Setting run name ${{ github.ref_name }}"

# Controls when the workflow will run
on:
Expand Down

0 comments on commit 21375fa

Please sign in to comment.