-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Create and push docker images to hub #198
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3bb903d
feat: Create and push docker images to hub
creatorrr d0ef438
feat: Github action for building and pushing docker images to hub
creatorrr 4128299
fix(.github): Use matrix strategy for docker build & push
creatorrr 1fd91a1
fix(.github): Do build/push manually instead of custom action
creatorrr a3b8d03
fix(.github): Set docker compose latest version
creatorrr b0e2dc6
fix(.github): Touch .env
creatorrr df3a71a
fix(.github): Simplify env_file
creatorrr c72584d
fix(.github): Fix agents-api docker-compose file
creatorrr b889fd6
fix(.github): Fix docker-build github action stuff
creatorrr dc24fd0
Merge branch 'dev' into f/docker-hub-images
creatorrr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,40 @@ | ||
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: | ||
Build-Push-Images-To-Docker-Hub: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: julepai | ||
creatorrr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
password: "${{ secrets.DOCKER_HUB_PASSWORD }}" | ||
creatorrr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- uses: KengoTODA/actions-setup-docker-compose@v1 | ||
with: | ||
version: "2.24.6" | ||
creatorrr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Build images | ||
run: | | ||
touch .env | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The 'touch .env' command is used twice in the workflow, once before building the images and once before pushing the images. This is unnecessary as the '.env' file only needs to be created once before building the images. Please remove the redundant 'touch .env' command. |
||
docker compose build | ||
|
||
- name: Push images | ||
run: | | ||
docker compose push | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matrix strategy is commented out and not used in the workflow. This means that the workflow will not be able to build and push images for multiple services as intended. Please uncomment and properly use the matrix strategy.