在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:actions/github-script开源软件地址:https://github.com/actions/github-script开源编程语言:TypeScript 98.1%开源软件介绍:actions/github-scriptThis action makes it easy to quickly write a script in your workflow that uses the GitHub API and the workflow run context. In order to use this action, a
Since the See octokit/rest.js for the API client documentation. Breaking ChangesBreaking changes in V6Version 6 of this action updated the runtime to Node 16 - https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-using-nodejs-v16 All scripts are now run with Node 16 instead of Node 12 and are affected by any breaking changes between Node 12 and 16. Breaking changes in V5Version 5 of this action includes the version 5 of For example,
DevelopmentSee development.md. Reading step resultsThe return value of the script will be in the step's outputs under the "result" key. - uses: actions/github-script@v6
id: set-result
with:
script: return "Hello!"
result-encoding: string
- name: Get result
run: echo "${{steps.set-result.outputs.result}}" See "Result encoding" for details on how the encoding of these outputs can be changed. Result encodingBy default, the JSON-encoded return value of the function is set as the "result" in the
output of a github-script step. For some workflows, string encoding is preferred. This option can be set using the
- uses: actions/github-script@v6
id: my-script
with:
result-encoding: string
script: return "I will be string (not JSON) encoded!" ExamplesNote that By default, github-script will use the token provided to your workflow. Print the available attributes of context- name: View context attributes
uses: actions/github-script@v6
with:
script: console.log(context) Comment on an issue全部评论
专题导读
上一篇:isacikgoz/gitbatch: manage your git repositories in one place发布时间:2022-06-11下一篇:hbons/SparkleShare: Share and collaborate by syncing with any Git repository ins ...发布时间:2022-06-11热门推荐
热门话题
阅读排行榜
|
请发表评论