Skip to content

Commit

Permalink
docs: azure push docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleTryon committed Jul 25, 2024
1 parent e9464d1 commit 2d575b0
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions content/integrations/github-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,48 @@ jobs:
tags: <gcp-region>-docker.pkg.dev/<gcp-project-id>/<your-app>:latest
```

### Build and push an image to Azure Container Registry with OIDC

After adding a [trust relationship](https://depot.dev/docs/cli/authentication#adding-a-trust-relationship-for-github-actions) between Depot and GitHub Actions, you'll be able to log in to Azure Container Registry using the `docker/login-action` and build and push an image to the registry using the `depot/build-push-action` via the image tag(s).

```yaml
name: Build and push to Azure Container Registry
on:
push:
branches:
- main
jobs:
docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Login to Azure Container Registry
uses: docker/login-action@v2
with:
registry: <registry-name>.azurecr.io
username: ${{ secrets.AZURE_CLIENT_ID }}
password: ${{ secrets.AZURE_CLIENT_SECRET }}
- name: Build and push
uses: depot/build-push-action@v1
with:
# if no depot.json file is at the root of your repo, you must specify the project id
project: <your-depot-project-id>
context: .
push: true
tags: <registry-name>.azurecr.io/<image-name>:<tag>
```

### Build and push to multiple registries

Build and tag an image to push to multiple registries by logging into each one individually.
Expand Down

0 comments on commit 2d575b0

Please sign in to comment.