creatorrr is building and pushing images to docker hub #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push images to docker hub on merge to dev | |
run-name: ${{ github.actor }} is building and pushing images to docker hub | |
on: | |
push: | |
branches: | |
- "dev" | |
- "main" | |
jobs: | |
Build-Push-Agents-API-Image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set branch name | |
id: variables | |
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: julepai | |
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | |
- name: Build and push agent images | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./agents-api | |
file: ./agents-api/Dockerfile | |
push: true | |
tags: julepai/agents-api:${{ steps.variables.outputs.branch_name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
Build-Push-Migration-Image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set branch name | |
id: variables | |
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: julepai | |
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | |
- name: Build and push migration image | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./agents-api | |
file: ./agents-api/Dockerfile.migration | |
push: true | |
tags: julepai/cozo-migrate:${{ steps.variables.outputs.branch_name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
Build-Push-Temporal-Image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set branch name | |
id: variables | |
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: julepai | |
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | |
- name: Build and push temporal image | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./agents-api | |
file: ./agents-api/Dockerfile.temporal | |
push: true | |
tags: julepai/temporal:${{ steps.variables.outputs.branch_name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
Build-Push-Worker-Image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set branch name | |
id: variables | |
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: julepai | |
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | |
- name: Build and push worker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./agents-api | |
file: ./agents-api/Dockerfile.worker | |
push: true | |
tags: julepai/worker:${{ steps.variables.outputs.branch_name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
Build-Push-Other-Images: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
service-directory: | |
- gateway | |
- memory-store | |
# - model-serving | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set branch name | |
id: variables | |
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: julepai | |
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | |
- name: Build and push images | |
uses: docker/build-push-action@v4 | |
with: | |
context: ./${{ matrix.service-directory }} | |
push: true | |
tags: julepai/${{ matrix.service-directory }}:${{ steps.variables.outputs.branch_name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |