Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ Following the capabilities of this action:
<td></td>
</tr>

<tr>
<td><code>subscription</code></td>
<td>(Optional) The Subscription name or ID</td>
<td></td>
</tr>
</table>

## Example usage
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.."
Expand Down