You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/checks.md
+24-5
Original file line number
Diff line number
Diff line change
@@ -2677,12 +2677,18 @@ jobs:
2677
2677
Example action metadata:
2678
2678
2679
2679
```yaml
2680
-
# .github/actions/some-action/action.yml
2680
+
# .github/actions/my-invalid-action/action.yml
2681
2681
2682
2682
name: 'My action'
2683
2683
author: '...'
2684
2684
# ERROR: 'description' section is required
2685
2685
2686
+
branding:
2687
+
# ERROR: Invalid icon name
2688
+
icon: dog
2689
+
# ERROR: Unsupported icon color
2690
+
color: black
2691
+
2686
2692
runs:
2687
2693
# ERROR: Node.js runtime version is too old
2688
2694
using: 'node14'
@@ -2696,19 +2702,27 @@ runs:
2696
2702
Output:
2697
2703
2698
2704
```
2699
-
test.yaml:8:15: description is required in metadata of "My action" action at "path/to/.github/actions/my-invalid-action/action.yml" [action]
2705
+
action_metadata_syntax_validation.yaml:8:15: description is required in metadata of "My action" action at "path/to/.github/actions/my-invalid-action/action.yml" [action]
2706
+
|
2707
+
8 | - uses: ./.github/actions/my-invalid-action
2708
+
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2709
+
action_metadata_syntax_validation.yaml:8:15: incorrect icon name "dog" at branding.icon in metadata of "My action" action at "path/to/.github/actions/my-invalid-action/action.yml". see the official document to know the exhaustive list of supported icons: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#brandingicon [action]
2710
+
|
2711
+
8 | - uses: ./.github/actions/my-invalid-action
2712
+
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2713
+
action_metadata_syntax_validation.yaml:8:15: incorrect color "black" at branding.icon in metadata of "My action" action at "path/to/.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]
2700
2714
|
2701
2715
8 | - uses: ./.github/actions/my-invalid-action
2702
2716
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2703
-
test.yaml:8:15: "node14" runner at "runs.using" is unavailable since the Node.js version is too old (14 < 16) in local action "My action" defined at "path/to/.github/actions/my-invalid-action". see https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions [action]
2717
+
action_metadata_syntax_validation.yaml:8:15: invalid runner name "node14" at runs.usingin "My action" action defined at "path/to/.github/actions/my-invalid-action". valid runners are "composite", "docker", "node16", and "node20". see https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs [action]
2704
2718
|
2705
2719
8 | - uses: ./.github/actions/my-invalid-action
2706
2720
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2707
-
test.yaml:8:15: file "this-file-does-not-exist.js" does not exist in "path/to/.github/actions/my-invalid-action". it is specified at "main" key in "runs" section in "My action" action [action]
2721
+
action_metadata_syntax_validation.yaml:8:15: file "this-file-does-not-exist.js" does not exist in "path/to/.github/actions/my-invalid-action". it is specified at "main" key in "runs" section in "My action" action [action]
2708
2722
|
2709
2723
8 | - uses: ./.github/actions/my-invalid-action
2710
2724
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2711
-
test.yaml:8:15: "env" is not allowed in "runs" section because "My action" is a JavaScript action. the action is defined at "path/to/.github/actions/my-invalid-action" [action]
2725
+
action_metadata_syntax_validation.yaml:8:15: "env" is not allowed in "runs" section because "My action" is a JavaScript action. the action is defined at "path/to/.github/actions/my-invalid-action" [action]
2712
2726
|
2713
2727
8 | - uses: ./.github/actions/my-invalid-action
2714
2728
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2724,6 +2738,10 @@ actionlint checks metadata files used in workflows and reports errors when they
2724
2738
Composite action or JavaScript action (e.g. `image:` is required for Docker action).
2725
2739
- Files specified in some keys under `runs` are existing. For example, JavaScript action defines a script file path for
2726
2740
entrypoint at `main:`.
2741
+
- Icon name at `icon:` in `branding:` section is correct. Supported icon names are listed in
2742
+
[the official document][branding-icons-doc].
2743
+
- Icon color at `color:` in `branding:` section is correct. Supported icon colors are white, yellow, blue, green, orange, red,
2744
+
purple, or gray-dark.
2727
2745
2728
2746
actionlint checks action metadata files which are used by workflows. Currently it is not supported to specify `action.yml`
2729
2747
directly via command line arguments.
@@ -2784,3 +2802,4 @@ Note that `steps` in Composite action's metadata is not checked at this point. I
/test\.yaml:8:15: description is required in metadata of "My action" action at ".+(\\\\|/)my-invalid-action(\\\\|/)action\.yml" \[action\]/
2
+
/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\]/
3
+
/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\]/
2
4
/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\", \"node16\", and \"node20\"\. see https://.+ \[action\]/
3
5
/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\]/
4
6
/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 commit comments