|
843 | 843 | }, |
844 | 844 | "required": ["runs-on"], |
845 | 845 | "additionalProperties": false |
| 846 | + }, |
| 847 | + "workflowDispatchInput": { |
| 848 | + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_id", |
| 849 | + "description": "A string identifier to associate with the input. The value of <input_id> is a map of the input's metadata. The <input_id> must be a unique identifier within the inputs object. The <input_id> must start with a letter or _ and contain only alphanumeric characters, -, or _.", |
| 850 | + "type": "object", |
| 851 | + "properties": { |
| 852 | + "description": { |
| 853 | + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddescription", |
| 854 | + "description": "A string description of the input parameter.", |
| 855 | + "type": "string" |
| 856 | + }, |
| 857 | + "deprecationMessage": { |
| 858 | + "description": "A string shown to users using the deprecated input.", |
| 859 | + "type": "string" |
| 860 | + }, |
| 861 | + "required": { |
| 862 | + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_idrequired", |
| 863 | + "description": "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.", |
| 864 | + "type": "boolean" |
| 865 | + }, |
| 866 | + "default": { |
| 867 | + "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddefault", |
| 868 | + "description": "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file." |
| 869 | + }, |
| 870 | + "type": { |
| 871 | + "$comment": "https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputsinput_idtype", |
| 872 | + "description": "A string representing the type of the input.", |
| 873 | + "type": "string", |
| 874 | + "enum": ["string", "choice", "boolean", "number", "environment"] |
| 875 | + }, |
| 876 | + "options": { |
| 877 | + "$comment": "https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows", |
| 878 | + "description": "The options of the dropdown list, if the type is a choice.", |
| 879 | + "type": "array", |
| 880 | + "items": { |
| 881 | + "type": "string" |
| 882 | + }, |
| 883 | + "minItems": 1 |
| 884 | + } |
| 885 | + }, |
| 886 | + "allOf": [ |
| 887 | + { |
| 888 | + "if": { |
| 889 | + "properties": { |
| 890 | + "type": { |
| 891 | + "const": "string" |
| 892 | + } |
| 893 | + }, |
| 894 | + "required": ["type"] |
| 895 | + }, |
| 896 | + "then": { |
| 897 | + "properties": { |
| 898 | + "default": { |
| 899 | + "type": "string" |
| 900 | + } |
| 901 | + } |
| 902 | + } |
| 903 | + }, |
| 904 | + { |
| 905 | + "if": { |
| 906 | + "properties": { |
| 907 | + "type": { |
| 908 | + "const": "boolean" |
| 909 | + } |
| 910 | + }, |
| 911 | + "required": ["type"] |
| 912 | + }, |
| 913 | + "then": { |
| 914 | + "properties": { |
| 915 | + "default": { |
| 916 | + "type": "boolean" |
| 917 | + } |
| 918 | + } |
| 919 | + } |
| 920 | + }, |
| 921 | + { |
| 922 | + "if": { |
| 923 | + "properties": { |
| 924 | + "type": { |
| 925 | + "const": "number" |
| 926 | + } |
| 927 | + }, |
| 928 | + "required": ["type"] |
| 929 | + }, |
| 930 | + "then": { |
| 931 | + "properties": { |
| 932 | + "default": { |
| 933 | + "type": "number" |
| 934 | + } |
| 935 | + } |
| 936 | + } |
| 937 | + }, |
| 938 | + { |
| 939 | + "if": { |
| 940 | + "properties": { |
| 941 | + "type": { |
| 942 | + "const": "environment" |
| 943 | + } |
| 944 | + }, |
| 945 | + "required": ["type"] |
| 946 | + }, |
| 947 | + "then": { |
| 948 | + "properties": { |
| 949 | + "default": { |
| 950 | + "type": "string" |
| 951 | + } |
| 952 | + } |
| 953 | + } |
| 954 | + }, |
| 955 | + { |
| 956 | + "if": { |
| 957 | + "properties": { |
| 958 | + "type": { |
| 959 | + "const": "choice" |
| 960 | + } |
| 961 | + }, |
| 962 | + "required": ["type"] |
| 963 | + }, |
| 964 | + "then": { |
| 965 | + "required": ["options"] |
| 966 | + } |
| 967 | + } |
| 968 | + ], |
| 969 | + "required": ["description"], |
| 970 | + "additionalProperties": false |
846 | 971 | } |
847 | 972 | }, |
848 | 973 | "properties": { |
|
1469 | 1594 | "type": "object", |
1470 | 1595 | "patternProperties": { |
1471 | 1596 | "^[_a-zA-Z][a-zA-Z0-9_-]*$": { |
1472 | | - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_id", |
1473 | | - "description": "A string identifier to associate with the input. The value of <input_id> is a map of the input's metadata. The <input_id> must be a unique identifier within the inputs object. The <input_id> must start with a letter or _ and contain only alphanumeric characters, -, or _.", |
1474 | | - "type": "object", |
1475 | | - "properties": { |
1476 | | - "description": { |
1477 | | - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddescription", |
1478 | | - "description": "A string description of the input parameter.", |
1479 | | - "type": "string" |
1480 | | - }, |
1481 | | - "deprecationMessage": { |
1482 | | - "description": "A string shown to users using the deprecated input.", |
1483 | | - "type": "string" |
1484 | | - }, |
1485 | | - "required": { |
1486 | | - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_idrequired", |
1487 | | - "description": "A boolean to indicate whether the action requires the input parameter. Set to true when the parameter is required.", |
1488 | | - "type": "boolean" |
1489 | | - }, |
1490 | | - "default": { |
1491 | | - "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddefault", |
1492 | | - "description": "A string representing the default value. The default value is used when an input parameter isn't specified in a workflow file." |
1493 | | - }, |
1494 | | - "type": { |
1495 | | - "$comment": "https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputsinput_idtype", |
1496 | | - "description": "A string representing the type of the input.", |
1497 | | - "type": "string", |
1498 | | - "enum": [ |
1499 | | - "string", |
1500 | | - "choice", |
1501 | | - "boolean", |
1502 | | - "number", |
1503 | | - "environment" |
1504 | | - ] |
1505 | | - }, |
1506 | | - "options": { |
1507 | | - "$comment": "https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows", |
1508 | | - "description": "The options of the dropdown list, if the type is a choice.", |
1509 | | - "type": "array", |
1510 | | - "items": { |
1511 | | - "type": "string" |
1512 | | - }, |
1513 | | - "minItems": 1 |
1514 | | - } |
1515 | | - }, |
1516 | | - "allOf": [ |
1517 | | - { |
1518 | | - "if": { |
1519 | | - "properties": { |
1520 | | - "type": { |
1521 | | - "const": "string" |
1522 | | - } |
1523 | | - }, |
1524 | | - "required": ["type"] |
1525 | | - }, |
1526 | | - "then": { |
1527 | | - "properties": { |
1528 | | - "default": { |
1529 | | - "type": "string" |
1530 | | - } |
1531 | | - } |
1532 | | - } |
1533 | | - }, |
1534 | | - { |
1535 | | - "if": { |
1536 | | - "properties": { |
1537 | | - "type": { |
1538 | | - "const": "boolean" |
1539 | | - } |
1540 | | - }, |
1541 | | - "required": ["type"] |
1542 | | - }, |
1543 | | - "then": { |
1544 | | - "properties": { |
1545 | | - "default": { |
1546 | | - "type": "boolean" |
1547 | | - } |
1548 | | - } |
1549 | | - } |
1550 | | - }, |
1551 | | - { |
1552 | | - "if": { |
1553 | | - "properties": { |
1554 | | - "type": { |
1555 | | - "const": "number" |
1556 | | - } |
1557 | | - }, |
1558 | | - "required": ["type"] |
1559 | | - }, |
1560 | | - "then": { |
1561 | | - "properties": { |
1562 | | - "default": { |
1563 | | - "type": "number" |
1564 | | - } |
1565 | | - } |
1566 | | - } |
1567 | | - }, |
1568 | | - { |
1569 | | - "if": { |
1570 | | - "properties": { |
1571 | | - "type": { |
1572 | | - "const": "environment" |
1573 | | - } |
1574 | | - }, |
1575 | | - "required": ["type"] |
1576 | | - }, |
1577 | | - "then": { |
1578 | | - "properties": { |
1579 | | - "default": { |
1580 | | - "type": "string" |
1581 | | - } |
1582 | | - } |
1583 | | - } |
1584 | | - }, |
1585 | | - { |
1586 | | - "if": { |
1587 | | - "properties": { |
1588 | | - "type": { |
1589 | | - "const": "choice" |
1590 | | - } |
1591 | | - }, |
1592 | | - "required": ["type"] |
1593 | | - }, |
1594 | | - "then": { |
1595 | | - "required": ["options"] |
1596 | | - } |
1597 | | - } |
1598 | | - ], |
1599 | | - "required": ["description"], |
1600 | | - "additionalProperties": false |
| 1597 | + "$ref": "#/definitions/workflowDispatchInput" |
1601 | 1598 | } |
1602 | 1599 | }, |
1603 | 1600 | "additionalProperties": false |
|
0 commit comments