Skip to content

CICD-271 · Azure Container Registry ​

Encyclopedia · Cloud infrastructure integration · All snippets

Previous · CICD-270 · Next · CICD-272

1. Where it fits ​

  • Placement CI run step or authorized lab terminal.
  • Prerequisites provider CLI, scoped CI identity, test environment and provider configuration for named resource.
  • Platforms github-actions, cloud-cli.
  • Parameters ACR_NAME, GITHUB_SHA.

2. Copy the snippet ​

bash
az acr login --name "${ACR_NAME:?}"
docker push "$ACR_NAME.azurecr.io/web:${GITHUB_SHA:?}"

3. How it works ​

Registry login configures Docker access using the current Azure identity. A narrowly scoped writer is still required. Push transfers a locally tagged image to the configured registry. The registry's resulting manifest digest identifies the released content.

4. Verify the result ​

Tag the image before the step and scope AcrPush to the registry or repository. Capture its digest for deployment.

Validation syntax-validated (Bash parse). Status definitions.