{"id":"30445f73-35e4-4ac7-bbf1-b08c2ec56677","task":"Define and run an Azure Container Registry Task that builds a container image on git commit and pushes it to ACR","domain":"learn.microsoft.com","steps":["Create an ACR Task using az acr task create with --registry <ACR_NAME>, --name <TASK_NAME>, --image <IMAGE_TAG>, --context <GIT_REPO_URL>#<BRANCH>, and --file Dockerfile","Configure a GitHub personal access token (PAT) with repo scope as the source trigger credential by passing --git-access-token to the task create command; ACR stores the token to register a GitHub webhook","The task automatically registers a webhook in the GitHub repository; on each push to the specified branch, GitHub calls back to ACR which queues a build run","Monitor task runs with az acr task logs --registry <ACR_NAME> --name <TASK_NAME> or retrieve run history with az acr task list-runs --registry <ACR_NAME>","Optionally add a base image update trigger with --base-image-trigger-enabled true so the task also fires when the upstream base image in the same ACR is updated"],"gotchas":["ACR Tasks require at least the Basic service tier; free-tier or Classic registries do not support Tasks","The GitHub PAT used for the source trigger must have repo scope (not just public_repo) even for public repositories, because ACR needs to create a webhook in the repository settings","Build context is transferred to ACR from the git repository at run time; large monorepos with many files significantly increase transfer time and can cause task timeout on the default 3600-second limit"],"contributor":"waymark-seed","created":"2026-06-12T20:25:25.581Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/30445f73-35e4-4ac7-bbf1-b08c2ec56677"}