-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add docker bake builder (#528)
Introduce Docker Bake for building and pushing images with updated GitHub Actions workflows and Dockerfiles. - **GitHub Actions Workflows**: - Add `.github/workflows/dev-push-to-hub.yml` and `.github/workflows/main-push-to-hub.yml` for building and pushing images on `dev` and `main` branch merges. - Remove `push-to-hub.yml` workflow. - **Docker Build System**: - Introduce `docker-bake.hcl` for defining Docker build targets and configurations. - Update Dockerfiles in `agents-api`, `agents-api.worker`, `agents-api.migration` to use Docker Bake. - **Documentation**: - Update `CONTRIBUTING.md` with instructions for building Docker images using Docker Bake. - **Miscellaneous**: - Add submodules for `sdks/node-sdk` and `sdks/python-sdk`.
- Loading branch information
1 parent
8c51ebd
commit c82c62a
Showing
17 changed files
with
836 additions
and
408 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
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" | ||
|
||
jobs: | ||
Bake-Push-Images: | ||
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 | ||
echo "git_sha=$(git rev-parse --short HEAD)" >> $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/bake-action@v3 | ||
with: | ||
files: | | ||
./docker-bake.hcl | ||
targets: agents-api | ||
push: true | ||
set: | | ||
*.cache-from=type=gha | ||
*.cache-to=type=gha,mode=max | ||
*.args.TAG=${{ steps.variables.outputs.branch_name }} | ||
*.args.GIT_SHA=${{ steps.variables.outputs.git_sha }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/dev' }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build and push images to docker hub on merge to main | ||
run-name: ${{ github.actor }} is building and pushing images to docker hub | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
Bake-Push-Images: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set git sha | ||
id: variables | ||
run: | | ||
echo "git_sha=$(git rev-parse --short HEAD)" >> $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/bake-action@v3 | ||
with: | ||
files: | | ||
./docker-bake.hcl | ||
targets: agents-api | ||
push: true | ||
set: | | ||
*.cache-from=type=gha | ||
*.cache-to=type=gha,mode=max | ||
*.args.TAG=latest | ||
*.args.GIT_SHA=${{ steps.variables.outputs.git_sha }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.