az webapp deployment github-actions
設定 Webapp 的 GitHub Actions。
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az webapp deployment github-actions add |
將 GitHub Actions 工作流程檔案新增至指定的存放庫。 工作流程會建置您的應用程式,並將其部署至指定的 Webapp。 |
Core | GA |
| az webapp deployment github-actions remove |
從指定的存放庫移除 GitHub Actions 工作流程檔案並中斷連線。 |
Core | 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
必要參數
將新增工作流程檔案的 GitHub 存放庫。 格式為:<owner>/<repository-name>。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
將新增工作流程檔案的分支。 如果未指定,則預設為 「master」。
| 屬性 | 值 |
|---|---|
| 預設值: | master |
若為 true,此命令會以衝突的名稱覆寫任何工作流程檔案。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
以互動方式使用 GitHub 登入以擷取個人存取令牌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
Web 應用程式的名稱。 如果未指定,則會隨機產生名稱。 您可以使用 來設定預設值 az configure --defaults web=<name>。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
以 Framework 格式規範化的 Web 運行時間 |版本,例如 “PHP|5.6”。 使用 「az webapp list-runtimes」 來取得可用清單。
位置的名稱。 如果未指定,則預設為生產位置。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
具有指定存放庫寫入許可權的個人存取令牌。 如需詳細資訊: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
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
必要參數
將新增工作流程檔案的 GitHub 存放庫。 格式為:<owner>/<repository-name>。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
將新增工作流程檔案的分支。 如果未指定,則預設為 「master」。
| 屬性 | 值 |
|---|---|
| 預設值: | master |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
以互動方式使用 GitHub 登入以擷取個人存取令牌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
Web 應用程式的名稱。 如果未指定,則會隨機產生名稱。 您可以使用 來設定預設值 az configure --defaults web=<name>。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
位置的名稱。 如果未指定,則預設為生產位置。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
具有指定存放庫寫入許可權的個人存取令牌。 如需詳細資訊: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |