-
Notifications
You must be signed in to change notification settings - Fork 468
🔨 improve the CICD process. #1055
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 hidden or 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,193 @@ | ||
| name: Docker Build All Images | ||
|
|
||
| concurrency: | ||
| group: docker-build-dev-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| branches: [develop] | ||
| push: | ||
| branches: [develop] | ||
|
|
||
| jobs: | ||
| build-main-amd64: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| contains(toJSON(github.event.head_commit), 'backend/') || | ||
| contains(toJSON(github.event.head_commit), 'sdk/') || | ||
| contains(toJSON(github.event.head_commit), 'make/main/') | ||
| steps: | ||
| - name: Set up Docker Buildx | ||
| run: | | ||
| if ! docker buildx inspect nexent_builder > /dev/null 2>&1; then | ||
| docker buildx create --name nexent_builder --use | ||
| else | ||
| docker buildx use nexent_builder | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Build main image (amd64) and load locally | ||
| run: | | ||
| docker buildx build --platform linux/amd64 -t nexent/nexent:dev-amd64 --load -f make/main/Dockerfile . | ||
|
|
||
| build-main-arm64: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| contains(toJSON(github.event.head_commit), 'backend/') || | ||
| contains(toJSON(github.event.head_commit), 'sdk/') || | ||
| contains(toJSON(github.event.head_commit), 'make/main/') | ||
| steps: | ||
| - name: Set up Docker Buildx | ||
| run: | | ||
| if ! docker buildx inspect nexent_builder > /dev/null 2>&1; then | ||
| docker buildx create --name nexent_builder --use | ||
| else | ||
| docker buildx use nexent_builder | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Build main image (arm64) and load locally | ||
| run: | | ||
| docker buildx build --platform linux/arm64 -t nexent/nexent:dev-arm64 --load -f make/main/Dockerfile . | ||
|
|
||
| build-data-process-amd64: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| contains(toJSON(github.event.head_commit), 'backend/') || | ||
| contains(toJSON(github.event.head_commit), 'sdk/') || | ||
| contains(toJSON(github.event.head_commit), 'make/data_process/') | ||
| steps: | ||
| - name: Free up disk space on GitHub runner | ||
| run: | | ||
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc | ||
porkpink marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Set up Docker Buildx | ||
| run: | | ||
| if ! docker buildx inspect nexent_builder > /dev/null 2>&1; then | ||
| docker buildx create --name nexent_builder --use | ||
| else | ||
| docker buildx use nexent_builder | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Clone model | ||
| run: | | ||
| GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Nexent-AI/model-assets | ||
| cd ./model-assets | ||
| GIT_TRACE=1 GIT_CURL_VERBOSE=1 GIT_LFS_LOG=debug git lfs pull | ||
| rm -rf .git .gitattributes | ||
porkpink marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Build data process image (amd64) and load locally | ||
| run: | | ||
| docker buildx build --platform linux/amd64 -t nexent/nexent-data-process:dev-amd64 --load -f make/data_process/Dockerfile . | ||
|
|
||
| build-data-process-arm64: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| contains(toJSON(github.event.head_commit), 'backend/') || | ||
| contains(toJSON(github.event.head_commit), 'sdk/') || | ||
| contains(toJSON(github.event.head_commit), 'make/data_process/') | ||
| steps: | ||
| - name: Free up disk space on GitHub runner | ||
| run: | | ||
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc | ||
| - name: Set up Docker Buildx | ||
| run: | | ||
| if ! docker buildx inspect nexent_builder > /dev/null 2>&1; then | ||
| docker buildx create --name nexent_builder --use | ||
| else | ||
| docker buildx use nexent_builder | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Clone model | ||
| run: | | ||
| GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Nexent-AI/model-assets | ||
| cd ./model-assets | ||
| GIT_TRACE=1 GIT_CURL_VERBOSE=1 GIT_LFS_LOG=debug git lfs pull | ||
| rm -rf .git .gitattributes | ||
| - name: Build data process image (arm64) and load locally | ||
| run: | | ||
| docker buildx build --platform linux/arm64 -t nexent/nexent-data-process:dev-arm64 --load -f make/data_process/Dockerfile . | ||
|
|
||
| build-web-amd64: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| contains(toJSON(github.event.head_commit), 'frontend/') || | ||
| contains(toJSON(github.event.head_commit), 'make/web/') | ||
| steps: | ||
| - name: Set up Docker Buildx | ||
| run: | | ||
| if ! docker buildx inspect nexent_builder > /dev/null 2>&1; then | ||
| docker buildx create --name nexent_builder --use | ||
| else | ||
| docker buildx use nexent_builder | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Build web image (amd64) and load locally | ||
| run: | | ||
| docker buildx build --platform linux/amd64 -t nexent/nexent-web:dev-amd64 --load -f make/web/Dockerfile . | ||
|
|
||
| build-web-arm64: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| contains(toJSON(github.event.head_commit), 'frontend/') || | ||
| contains(toJSON(github.event.head_commit), 'make/web/') | ||
| steps: | ||
| - name: Set up Docker Buildx | ||
| run: | | ||
| if ! docker buildx inspect nexent_builder > /dev/null 2>&1; then | ||
| docker buildx create --name nexent_builder --use | ||
| else | ||
| docker buildx use nexent_builder | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Build web image (arm64) and load locally | ||
| run: | | ||
| docker buildx build --platform linux/arm64 -t nexent/nexent-web:dev-arm64 --load -f make/web/Dockerfile . | ||
|
|
||
| build-terminal-amd64: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| contains(toJSON(github.event.head_commit), 'make/terminal/') | ||
| steps: | ||
| - name: Set up Docker Buildx | ||
| run: | | ||
| if ! docker buildx inspect nexent_builder > /dev/null 2>&1; then | ||
| docker buildx create --name nexent_builder --use | ||
| else | ||
| docker buildx use nexent_builder | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Build terminal image (amd64) and load locally | ||
| run: | | ||
| docker buildx build --platform linux/amd64 -t nexent/nexent-ubuntu-terminal:dev-amd64 --load -f make/terminal/Dockerfile . | ||
|
|
||
| build-terminal-arm64: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| contains(toJSON(github.event.head_commit), 'make/terminal/') | ||
| steps: | ||
| - name: Set up Docker Buildx | ||
| run: | | ||
| if ! docker buildx inspect nexent_builder > /dev/null 2>&1; then | ||
| docker buildx create --name nexent_builder --use | ||
| else | ||
| docker buildx use nexent_builder | ||
| fi | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Build terminal image (arm64) and load locally | ||
| run: | | ||
| docker buildx build --platform linux/arm64 -t nexent/nexent-ubuntu-terminal:dev-arm64 --load -f make/terminal/Dockerfile . | ||
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.
Uh oh!
There was an error while loading. Please reload this page.