az webapp deployment github-actions

設定 Webapp 的 GitHub Actions。

命令

名稱 Description 類型 狀態
az webapp deployment github-actions add

將 GitHub Actions 工作流程檔案新增至指定的存放庫。 工作流程會建置您的應用程式,並將其部署至指定的 Webapp。

核心 GA
az webapp deployment github-actions remove

從指定的存放庫移除 GitHub Actions 工作流程檔案並中斷連線。

核心 GA

az webapp deployment github-actions add

將 GitHub Actions 工作流程檔案新增至指定的存放庫。 工作流程會建置您的應用程式,並將其部署至指定的 Webapp。

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

範例

將 GitHub Actions 新增至指定的存放庫,並提供個人存取權杖

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

使用擷取個人存取權杖的互動式方法,將 GitHub Actions 新增至指定的存放庫

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

必要參數

--repo

將新增工作流程檔案的 GitHub 存放庫。 格式為: /。

選擇性參數

--branch -b

將新增工作流程檔案的分支。 如果未指定,則預設為 「master」。

預設值: master
--force -f

若為 true,此命令會以衝突的名稱覆寫任何工作流程檔案。

預設值: False
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--login-with-github

以互動方式使用 GitHub 登入以擷取個人存取權杖。

預設值: False
--name -n

Web 應用程式的名稱。 如果未指定,則會隨機產生名稱。 您可以使用 來設定預設值 az configure --defaults web=<name>

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--runtime -r

以 Framework 格式正常化的 Web 執行時間 |版本,例如 「PHP|5.6」。 使用 「az webapp list-runtimes」 來取得可用清單。

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az webapp deployment github-actions remove

從指定的存放庫移除 GitHub Actions 工作流程檔案並中斷連線。

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

範例

從指定的存放庫移除 GitHub Actions,並提供個人存取權杖

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

使用擷取個人存取權杖的互動式方法,從指定的存放庫移除 GitHub Actions

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

必要參數

--repo

將新增工作流程檔案的 GitHub 存放庫。 格式為: /。

選擇性參數

--branch -b

將新增工作流程檔案的分支。 如果未指定,則預設為 「master」。

預設值: master
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--login-with-github

以互動方式使用 GitHub 登入以擷取個人存取權杖。

預設值: False
--name -n

Web 應用程式的名稱。 如果未指定,則會隨機產生名稱。 您可以使用 來設定預設值 az configure --defaults web=<name>

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--slot -s

位置的名稱。 如果未指定,則預設為生產位置。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。