Skip to content

Commit

Permalink
wip(.github): Trying buildx instead of docker compose
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Apr 17, 2024
1 parent 13b1515 commit 8b1ba62
Showing 1 changed file with 116 additions and 4 deletions.
120 changes: 116 additions & 4 deletions .github/workflows/push-to-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,122 @@ on: [push]
# - "dev"

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:
Expand Down Expand Up @@ -41,10 +157,6 @@ jobs:
tags: julepai/${{ matrix.service-directory }}:${{ steps.variables.outputs.branch_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
# cache-from: |
# type=registry,ref=julepai/${{ matrix.service-directory }}:${{ steps.variables.outputs.branch_name }}
# type=registry,ref=julepai/${{ matrix.service-directory }}:dev
# cache-to: type=inline

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down

0 comments on commit 8b1ba62

Please sign in to comment.