Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

ci: push images to docker hub

Marc Klingen775498274f3a
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index 14e1198b87..faacbd5c5b 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -214,9 +214,20 @@ jobs:
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
environment: "protected branches"
runs-on: ubuntu-latest
- env:
- REGISTRY: ghcr.io
- IMAGE_NAME: ${{ github.repository }}
+ strategy:
+ matrix:
+ registry:
+ - ghcr.io
+ - docker.io
+ include:
+ - registry: ghcr.io
+ image_prefix: ghcr.io/${{ github.repository }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ - registry: docker.io
+ image_prefix: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.repository }}
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
permissions:
packages: write
contents: read
@@ -237,16 +248,15 @@ jobs:
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
- registry: ${{ env.REGISTRY }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
+ registry: ${{ matrix.registry }}
+ username: ${{ matrix.username }}
+ password: ${{ matrix.password }}
- name: Extract metadata (tags, labels) for Docker
id: meta-web
uses: docker/metadata-action@v4
with:
- images: |
- ${{ env.REGISTRY }}/${{ github.repository }}
+ images: ${{ matrix.image_prefix }}
tags: |
type=ref,event=branch
type=ref,event=pr
@@ -255,7 +265,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- - name: Build and push Docker image (web)
+ - name: Build and push Docker image (web) to ${{ matrix.registry }}
uses: docker/build-push-action@v4
with:
context: .
@@ -268,8 +278,7 @@ jobs:
id: meta-worker
uses: docker/metadata-action@v4
with:
- images: |
- ${{ env.REGISTRY }}/${{ github.repository }}-worker
+ images: ${{ matrix.image_prefix }}-worker
tags: |
type=ref,event=branch
type=ref,event=pr
@@ -278,7 +287,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- - name: Build and push Docker image (worker)
+ - name: Build and push Docker image (worker) to ${{ matrix.registry }}
uses: docker/build-push-action@v4
with:
context: .