你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az functionapp deployment github-actions

为 functionapp 配置 GitHub Actions。

命令

名称 说明 类型 状态
az functionapp deployment github-actions add

将 GitHub Actions 工作流文件添加到指定的存储库。 工作流将生成应用并将其部署到指定的 functionapp。

核心 GA
az functionapp deployment github-actions remove

删除 GitHub Actions 工作流文件并将其与指定的存储库断开连接。

核心 GA

az functionapp deployment github-actions add

将 GitHub Actions 工作流文件添加到指定的存储库。 工作流将生成应用并将其部署到指定的 functionapp。

az functionapp deployment github-actions add --repo
                                             [--branch]
                                             [--build-path]
                                             [--force]
                                             [--ids]
                                             [--login-with-github]
                                             [--name]
                                             [--resource-group]
                                             [--runtime]
                                             [--runtime-version]
                                             [--slot]
                                             [--subscription]
                                             [--token]

示例

将 GitHub Actions 添加到指定的存储库,提供个人访问令牌

az functionapp deployment github-actions add --repo "githubUser/githubRepo" -g MyResourceGroup -n MyFunctionapp --token MyPersonalAccessToken

使用检索个人访问令牌的交互式方法将 GitHub Actions 添加到指定的存储库

az functionapp deployment github-actions add --repo "githubUser/githubRepo" -g MyResourceGroup -n MyFunctionapp --login-with-github

必需参数

--repo

将向其添加工作流文件的 GitHub 存储库。 采用以下格式: https://github.com//或 /。

可选参数

--branch -b

将向其添加工作流文件的分支。

默认值: master
--build-path

生成要求的路径。 例如:包路径、POM XML 目录。

默认值: .
--force -f

如果为 true,该命令将覆盖任何具有冲突名称的工作流文件。

默认值: False
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--login-with-github

使用 Github 以交互方式登录以检索个人访问令牌。

默认值: False
--name -n

函数应用的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--runtime -r

函数运行时堆栈。 使用“az functionapp list-runtimes”检查支持的运行时和版本。

--runtime-version -v

函数运行时堆栈的版本。 函数运行时堆栈。 使用“az functionapp list-runtimes”检查支持的运行时和版本。

--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--token

具有对指定存储库的写入访问权限的个人访问令牌。 有关详细信息,请参阅 https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。

az functionapp deployment github-actions remove

删除 GitHub Actions 工作流文件并将其与指定的存储库断开连接。

az functionapp deployment github-actions remove --repo
                                                [--branch]
                                                [--ids]
                                                [--login-with-github]
                                                [--name]
                                                [--resource-group]
                                                [--slot]
                                                [--subscription]
                                                [--token]

示例

从指定的存储库中删除 GitHub Actions,提供个人访问令牌

az functionapp deployment github-actions remove --repo "githubUser/githubRepo" -g MyResourceGroup -n MyFunctionapp --token MyPersonalAccessToken

使用检索个人访问令牌的交互式方法从指定的存储库中删除 GitHub Actions

az functionapp deployment github-actions remove --repo "githubUser/githubRepo" -g MyResourceGroup -n MyFunctionapp --login-with-github

必需参数

--repo

将向其添加工作流文件的 GitHub 存储库。 采用以下格式: https://github.com//或 /。

可选参数

--branch -b

将向其添加工作流文件的分支。

默认值: master
--ids

一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。

--login-with-github

使用 Github 以交互方式登录以检索个人访问令牌。

默认值: False
--name -n

函数应用的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name> 配置默认组。

--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--token

具有对指定存储库的写入访问权限的个人访问令牌。 有关详细信息,请参阅 https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
默认值: json
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

提高日志记录详细程度。 使用 --debug 获取完整的调试日志。