From 54964edd8041e8f31cbacd6dea5775b4b38475fb Mon Sep 17 00:00:00 2001 From: Ben Chiciudean Date: Thu, 15 Dec 2022 13:25:00 +0200 Subject: [PATCH 1/3] feat: add subscription input as optional --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index ad9d692..184c62e 100644 --- a/action.yml +++ b/action.yml @@ -41,6 +41,9 @@ inputs: build_args: description: "JSON specifying key=value pairs as as Docker build arguments" required: false + subscription: + description: "The Subscription Name or ID" + required: false runs: using: "docker" image: "Dockerfile" From 2f35b7a7bc060667e6573a136bc4faf319c5447f Mon Sep 17 00:00:00 2001 From: Ben Chiciudean Date: Thu, 15 Dec 2022 13:26:23 +0200 Subject: [PATCH 2/3] feat: add set subscription --- entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index c667c63..0ce5150 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -17,6 +17,10 @@ if [ -n "$INPUT_GIT_ACCESS_TOKEN" ]; then GIT_ACCESS_TOKEN_FLAG="${INPUT_GIT_ACCESS_TOKEN}@" fi +if [ -n "$INPUT_SUBSCRIPTION" ]; then + az account set -s $INPUT_SUBSCRIPTION +fi + echo "Building Docker image ${INPUT_REPOSITORY}${IMAGE_PART}:${INPUT_TAG} from ${GITHUB_REPOSITORY} on ${INPUT_BRANCH} and using context ${INPUT_FOLDER} ; and pushing it to ${INPUT_REGISTRY} Azure Container Registry" echo "Logging into azure.." From 0f48c66d47e955f109d50074958c4b8fa8dc9555 Mon Sep 17 00:00:00 2001 From: Ben Chiciudean Date: Mon, 19 Jun 2023 09:59:44 +0300 Subject: [PATCH 3/3] doc: update readme.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index b375af2..b33dde3 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,11 @@ Following the capabilities of this action: + + subscription + (Optional) The Subscription name or ID + + ## Example usage