Skip to content

Commit

Permalink
Merge pull request #485 from eifinger/support-branding-color-black
Browse files Browse the repository at this point in the history
Support branding.color "black"
  • Loading branch information
rhysd authored Nov 26, 2024
2 parents 6433667 + 1d2ba75 commit b00d12c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2830,7 +2830,7 @@ branding:
# ERROR: Invalid icon name
icon: dog
# ERROR: Unsupported icon color
color: black
color: gray-white
runs:
# ERROR: Node.js runtime version is too old
Expand Down Expand Up @@ -2867,7 +2867,7 @@ test.yaml:8:15: incorrect icon name "dog" at branding.icon in metadata of "My ac
|
8 | - uses: ./.github/actions/my-invalid-action
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test.yaml:8:15: incorrect color "black" at branding.icon in metadata of "My action" action at "/Users/rhysd/.go/src/github.com/rhysd/actionlint/.github/actions/my-invalid-action/action.yml". see the official document to know the exhaustive list of supported colors: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#brandingcolor [action]
test.yaml:8:15: incorrect color "gray-white" at branding.icon in metadata of "My action" action at "/Users/rhysd/.go/src/github.com/rhysd/actionlint/.github/actions/my-invalid-action/action.yml". see the official document to know the exhaustive list of supported colors: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#brandingcolor [action]
|
8 | - uses: ./.github/actions/my-invalid-action
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions rule_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
// https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#brandingcolor
var BrandingColors = map[string]struct{}{
"white": {},
"black": {},
"yellow": {},
"blue": {},
"green": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ branding:
# ERROR: Invalid icon name
icon: dog
# ERROR: Unsupported icon color
color: black
color: gray-white

runs:
# ERROR: Node.js runtime version is too old
Expand Down
2 changes: 1 addition & 1 deletion testdata/examples/action_metadata_syntax_validation.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/test\.yaml:8:15: description is required in metadata of "My action" action at ".+(\\\\|/)my-invalid-action(\\\\|/)action\.yml" \[action\]/
/test\.yaml:8:15: incorrect icon name "dog" at branding\.icon in metadata of "My action" action at ".+(\\\\|/)my-invalid-action(\\\\|/)action\.yml"\. see the official document to know the exhaustive list of supported icons: https://.+ \[action\]/
/test\.yaml:8:15: incorrect color "black" at branding\.icon in metadata of "My action" action at ".+(\\\\|/)my-invalid-action(\\\\|/)action\.yml"\. see the official document to know the exhaustive list of supported colors: https://.+ \[action\]/
/test\.yaml:8:15: incorrect color "gray-white" at branding\.icon in metadata of "My action" action at ".+(\\\\|/)my-invalid-action(\\\\|/)action\.yml"\. see the official document to know the exhaustive list of supported colors: https://.+ \[action\]/
/test\.yaml:8:15: invalid runner name \"node14\" at runs\.using in \"My action\" action defined at \".+(\\\\|/)actions(\\\\|/)my-invalid-action\"\. valid runners are \"composite\", \"docker\", and \"node20\"\. see https://.+ \[action\]/
/test\.yaml:8:15: file "this-file-does-not-exist\.js" does not exist in ".+(\\\\|/)my-invalid-action"\. it is specified at "main" key in "runs" section in "My action" action \[action\]/
/test\.yaml:8:15: "env" is not allowed in "runs" section because "My action" is a JavaScript action\. the action is defined at ".+(\\\\|/)my-invalid-action" \[action\]/

0 comments on commit b00d12c

Please sign in to comment.