az containerapp github-action

Note

このコマンド グループには、Azure CLI と少なくとも 1 つの拡張機能の両方で定義されているコマンドがあります。 各拡張機能をインストールして、拡張機能を活用します。 拡張機能の詳細をご覧ください。

GitHub Actions を管理するコマンド。

コマンド

名前 説明 Status
az containerapp github-action add

GitHub Actions ワークフローをリポジトリに追加して、コンテナー アプリをデプロイします。

コア GA
az containerapp github-action add (containerapp 拡張機能)

GitHub Actions ワークフローをリポジトリに追加して、コンテナー アプリをデプロイします。

拡張子 GA
az containerapp github-action delete

以前に構成した Container Apps GitHub Actions ワークフローをリポジトリから削除します。

コア GA
az containerapp github-action show

コンテナー アプリに GitHub Actions の構成を表示します。

コア GA

az containerapp github-action add

GitHub Actions ワークフローをリポジトリに追加して、コンテナー アプリをデプロイします。

az containerapp github-action add --repo-url
                                  [--branch]
                                  [--context-path]
                                  [--ids]
                                  [--image]
                                  [--login-with-github]
                                  [--name]
                                  [--registry-password]
                                  [--registry-url]
                                  [--registry-username]
                                  [--resource-group]
                                  [--service-principal-client-id]
                                  [--service-principal-client-secret]
                                  [--service-principal-tenant-id]
                                  [--subscription]
                                  [--token]

Azure Container Registry と個人用アクセス トークンを使用して、GitHub Actions を追加します。

az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main --registry-url myregistryurl.azurecr.io --service-principal-client-id 00000000-0000-0000-0000-00000000 --service-principal-tenant-id 00000000-0000-0000-0000-00000000 --service-principal-client-secret ClientSecret --token MyAccessToken

Azure Container Registry を使用して GitHub Actions を追加し、GitHub フローにログインして個人用アクセス トークンを取得します。

az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main --registry-url myregistryurl.azurecr.io --service-principal-client-id 00000000-0000-0000-0000-00000000 --service-principal-tenant-id 00000000-0000-0000-0000-00000000 --service-principal-client-secret ClientSecret --login-with-github

Docker Hub を使用して GitHub Actions を追加し、GitHub フローにログインして個人用アクセス トークンを取得します。

az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main --registry-username MyUsername --registry-password MyPassword --service-principal-client-id 00000000-0000-0000-0000-00000000 --service-principal-tenant-id 00000000-0000-0000-0000-00000000 --service-principal-client-secret ClientSecret --login-with-github

必須のパラメーター

--repo-url

ワークフロー ファイルの追加先となる GitHub リポジトリ。 形式: https://github.com//.

省略可能のパラメーター

--branch -b

Github リポジトリのブランチ。 指定されていない場合は、Github リポジトリの既定のブランチと見なされます。

--context-path

Docker ビルドの実行元となるリポジトリ内のパス。 既定値は "./" です。

--ids

1 つまたは複数のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--image -i

Github アクションで使用するコンテナー イメージ名。 既定値はコンテナー アプリ名です。

--login-with-github

Github を使用して対話形式でログインし、個人用アクセス トークンを取得します。

既定値: False
--name -n

Containerapp の名前。 名前は、小文字の英数字または '-' で構成され、文字で始まり、英数字で終わる必要があり、'--' を持つことができず、32 文字未満である必要があります。

--registry-password

レジストリのパスワード。 Azure Container Registry を使用している場合は、指定されていない場合は資格情報の推論を試みます。

--registry-url

コンテナー レジストリ サーバー (例: myregistry.azurecr.io)。

--registry-username

レジストリのユーザー名。 Azure Container Registry を使用している場合は、指定されていない場合は資格情報の推論を試みます。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--service-principal-client-id

サービス プリンシパルのクライアント ID。

--service-principal-client-secret

サービス プリンシパルのクライアント シークレット。

--service-principal-tenant-id

サービス プリンシパル テナント ID。

--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 containerapp github-action add (containerapp 拡張機能)

GitHub Actions ワークフローをリポジトリに追加して、コンテナー アプリをデプロイします。

az containerapp github-action add --repo-url
                                  [--branch]
                                  [--build-env-vars]
                                  [--context-path]
                                  [--ids]
                                  [--image]
                                  [--login-with-github]
                                  [--name]
                                  [--registry-password]
                                  [--registry-url]
                                  [--registry-username]
                                  [--resource-group]
                                  [--service-principal-client-id]
                                  [--service-principal-client-secret]
                                  [--service-principal-tenant-id]
                                  [--subscription]
                                  [--token]

Azure Container Registry と個人用アクセス トークンを使用して、GitHub Actions を追加します。

az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main --registry-url myregistryurl.azurecr.io --service-principal-client-id 00000000-0000-0000-0000-00000000 --service-principal-tenant-id 00000000-0000-0000-0000-00000000 --service-principal-client-secret ClientSecret --token MyAccessToken

Azure Container Registry と個人用アクセス トークンを使用して GitHub Actions を追加し、ビルド環境変数を使用してイメージ ビルドを構成します。

az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main --registry-url myregistryurl.azurecr.io --service-principal-client-id 00000000-0000-0000-0000-00000000 --service-principal-tenant-id 00000000-0000-0000-0000-00000000 --service-principal-client-secret ClientSecret --token MyAccessToken --build-env-vars BP_JVM_VERSION=21 BP_MAVEN_VERSION=4

Azure Container Registry を使用して GitHub Actions を追加し、GitHub フローにログインして個人用アクセス トークンを取得します。

az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main --registry-url myregistryurl.azurecr.io --service-principal-client-id 00000000-0000-0000-0000-00000000 --service-principal-tenant-id 00000000-0000-0000-0000-00000000 --service-principal-client-secret ClientSecret --login-with-github

Docker Hub を使用して GitHub Actions を追加し、GitHub フローにログインして個人用アクセス トークンを取得します。

az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main --registry-username MyUsername --registry-password MyPassword --service-principal-client-id 00000000-0000-0000-0000-00000000 --service-principal-tenant-id 00000000-0000-0000-0000-00000000 --service-principal-client-secret ClientSecret --login-with-github

必須のパラメーター

--repo-url

ワークフロー ファイルの追加先となる GitHub リポジトリ。 形式: https://github.com//.

省略可能のパラメーター

--branch -b

Github リポジトリのブランチ。 指定されていない場合は、Github リポジトリの既定のブランチと見なされます。

--build-env-vars
プレビュー

ビルドの環境変数の一覧。 'key=value' 形式のスペース区切り値。

--context-path

Docker ビルドの実行元となるリポジトリ内のパス。 既定値は "./" です。

--ids

1 つまたは複数のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--image -i

Github アクションで使用するコンテナー イメージ名。 既定値はコンテナー アプリ名です。

--login-with-github

Github を使用して対話形式でログインし、個人用アクセス トークンを取得します。

既定値: False
--name -n

Containerapp の名前。 名前は、小文字の英数字または '-' で構成され、文字で始まり、英数字で終わる必要があり、'--' を持つことができず、32 文字未満である必要があります。

--registry-password

レジストリのパスワード。 Azure Container Registry を使用している場合は、指定されていない場合は資格情報の推論を試みます。

--registry-url

コンテナー レジストリ サーバー (例: myregistry.azurecr.io)。

--registry-username

レジストリのユーザー名。 Azure Container Registry を使用している場合は、指定されていない場合は資格情報の推論を試みます。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--service-principal-client-id

サービス プリンシパルのクライアント ID。

--service-principal-client-secret

サービス プリンシパルのクライアント シークレット。

--service-principal-tenant-id

サービス プリンシパル テナント ID。

--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 containerapp github-action delete

以前に構成した Container Apps GitHub Actions ワークフローをリポジトリから削除します。

az containerapp github-action delete [--ids]
                                     [--login-with-github]
                                     [--name]
                                     [--resource-group]
                                     [--subscription]
                                     [--token]

個人用アクセス トークンを使用して GitHub Actions を削除します。

az containerapp github-action delete -g MyResourceGroup -n MyContainerapp --token MyAccessToken

GitHub へのログイン フローを使用して GitHub Actions を削除し、個人用アクセス トークンを取得します。

az containerapp github-action delete -g MyResourceGroup -n MyContainerapp --login-with-github

省略可能のパラメーター

--ids

1 つまたは複数のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--login-with-github

Github を使用して対話形式でログインし、個人用アクセス トークンを取得します。

既定値: False
--name -n

Containerapp の名前。 名前は、小文字の英数字または '-' で構成され、文字で始まり、英数字で終わる必要があり、'--' を持つことができず、32 文字未満である必要があります。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--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 containerapp github-action show

コンテナー アプリに GitHub Actions の構成を表示します。

az containerapp github-action show [--ids]
                                   [--name]
                                   [--resource-group]
                                   [--subscription]

Containerapp に GitHub Actions の構成を表示します。

az containerapp github-action show -g MyResourceGroup -n MyContainerapp

省略可能のパラメーター

--ids

1 つまたは複数のリソース ID (スペース区切り)。 これは、'Resource Id' 引数のすべての情報を含む完全なリソース ID である必要があります。 --ids または他の 'Resource Id' 引数を指定する必要があります。

--name -n

Containerapp の名前。 名前は、小文字の英数字または '-' で構成され、文字で始まり、英数字で終わる必要があり、'--' を持つことができず、32 文字未満である必要があります。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

グローバル パラメーター
--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 を使います。