ts-ci/action.yml
2024-05-19 08:54:10 +02:00

84 lines
No EOL
3.4 KiB
YAML

name: 'github_actions_toolkit'
description: 'A collection of github actions'
author: 'u/garronej'
inputs:
action_name:
required: true
description: 'Action to run, one of: "get_package_json_version", "dispatch_event", "update_changelog", "sync_package_and_package_lock_version", "setup_repo_webhook_for_deno_land_publishing", "is_well_formed_and_available_module_name", "string_replace", "tell_if_project_uses_npm_or_yarn", "is_package_json_version_upgraded", "remove_dark_mode_specific_images_from_readme"'
owner:
required: false
description: 'Repository owner, example: ''garronej'',github.repository_owner'
default: '${{github.repository_owner}}'
repo:
required: false
description: 'Repository name, example: ''evt'', github.event.repository.name'
default: '${{github.event.repository.name}}'
event_type:
required: false
description: 'see: https://developer.github.com/v3/repos/#create-a-repository-dispatch-event'
client_payload_json:
required: false
description: 'Example ''{"p":"foo"}'' see: https://developer.github.com/v3/repos/#create-a-repository-dispatch-event'
branch:
required: false
description: 'Example: default ( can also be a sha )'
default: '${{ github.sha }}'
exclude_commit_from_author_names_json:
required: false
description: 'For update_changelog, do not includes commit from user certain committer in the CHANGELOG.md, ex: ''["denoify_ci"]'''
default: '["actions"]'
module_name:
required: false
description: 'A candidate module name, Example: lodash'
compare_to_version:
required: false
description: 'For get_package_json_version, a version against which comparing the result if found version more recent than compare_to_version compare_result is 1 if found version is equal to compare_to_version compare_result is 0 if found version is older to compare_to_version compare_result -1 Example: 0.1.3'
input_string:
required: false
description: 'For string_replace, the string to replace'
search_value:
required: false
description: 'For string_replace, Example ''-'' ( Will be used as arg for RegExp constructor )'
replace_value:
required: false
description: 'For string_replace, Example ''_'''
should_webhook_be_enabled:
required: false
description: 'true|false, Should the create webhook be enabled, with setup_repo_webhook_for_deno_land_publishing'
default: 'true'
github_token:
required: false
description: 'GitHub Personal access token'
default: '${{ github.token }}'
outputs:
version:
description: 'Output of get_package_json_version'
is_valid_node_module_name:
description: 'true|false'
is_valid_deno_module_name:
description: 'true|false'
is_available_on_npm:
description: 'true|false'
is_available_on_deno_land:
description: 'true|false'
was_already_published:
description: 'true|false'
compare_result:
description: '1|0|-1'
replace_result:
description: 'Output of string_replace'
was_hook_created:
description: 'true|false'
npm_or_yarn:
description: 'npm|yarn'
from_version:
description: 'Output of is_package_json_version_upgraded, string'
to_version:
description: 'Output of is_package_json_version_upgraded, string'
is_upgraded_version:
description: 'Output of is_package_json_version_upgraded, true|false'
is_pre_release:
description: 'Output of is_package_json_version_upgraded, true|false'
runs:
using: 'node20'
main: 'dist/index.js'