# action.ymlname:'Hello World'description:'Greet someone and record the time'inputs:who-to-greet:# id of inputdescription:'Who to greet'required:truedefault:'World'outputs:time:# id of outputdescription:'The time we greeted you'runs:using:'docker'image:'Dockerfile'args:-${{ inputs.who-...
name:"Hello Actions"description:"Greet someone"author:"octocat@github.com"inputs:MY_NAME:description:"Who to greet"required:truedefault:"World"runs:uses:"docker"image:"Dockerfile"branding:icon:"mic"color:"purple" 请注意inputs部分。 此处你将获得名为MY_NAME的变量的值。 此变量将...
有关 with 语法的详细信息,请参阅“GitHub Actions 的工作流语法”。 inputs: num-octocats: description: 'Number of Octocats' required: false default: '1' octocat-eye-color: description: 'Eye color of the Octocats' required: true 当在工作流文件中指定输入或使用默认输入值时,GitHub 将为...
GitHub Actions 是一个持续集成和持续交付 (CI/CD) 平台,可用于自动执行构建、测试和部署管道。 您可以创建工作流程来构建和测试存储库的每个拉取请求,或将合并的拉取请求部署到生产环境。 GitHub Actions 不仅仅是 DevOps,还允许您在存储库中发生其他事件时运行工作流程。 例如,您可以运行工作流程,以便在有人在您...
@actions/github:得到经过身份验证的 Octokit REST 客户端和对 GitHub 操作上下文的访问。 编写action脚本: // 导入相关依赖constgithub =require("@actions/github");constcore =require("@actions/core");constdayjs =require("dayjs");constfs =require("fs");// 接收输入参数consttoken = core.getInput(...
在执行 workflow 时, 允许在 GitHub Actions 页面输入参数,控制执行逻辑。我们可以将人工处理的逻辑,在 GitHub Actions 参数化执行,适用于持续部署场景。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 on: workflow_dispatch: inputs: logLevel: description: 'Log level' required: true default: 'warning...
在执行 workflow 时, 允许在 GitHub Actions 页面输入参数,控制执行逻辑。我们可以将人工处理的逻辑,在 GitHub Actions 参数化执行,适用于持续部署场景。 on: workflow_dispatch: inputs: logLevel: description: 'Log level' required: true default: 'warning' ...
actions 使用GitHub Actions。 例如,actions: write 允许操作取消工作流运行。 有关详细信息,请参阅“GitHub 应用程序所需的权限”。 attestations 使用项目证明。 例如,attestations: write 允许一个操作为生成生成项目证明。 有关详细信息,请参阅 使用项目证明确立生成的来源 checks 使用检查运行和检查套件。 例如,...
Github actions Artifact除了可以不同job共享文件,也可以手动到Github Action下载文件,比如编译打包后的文件。只是Github只帮忙保存30天,不是永久保存的。 定义环境变量 job定义环境变量 代码语言:javascript 复制 jobs:job1:env:FIRST_NAME:Mona复制代码 step定义环境变量 ...
通过此事件,可以使用 GitHub REST API 或通过选择 GitHub 上存储库中“操作”选项卡中的“运行工作流”按钮来运行工作流。 使用workflow_dispatch,你可以选择要在哪个分支上运行工作流,还可以设置 GitHub 在 UI 中以窗体元素显示的可选 inputs。yml 复制 ...