To learn more about GitHub CLI, see "About GitHub CLI."
GitHub CLI is preinstalled on all GitHub-hosted runners. For each step that uses GitHub CLI, you must set an environment variable called GITHUB_TOKEN to a token with the required scopes.
You can execute any GitHub CLI command. For example, this workflow uses the gh issue comment subcommand to add a comment when an issue is opened.
name: Comment when opened