mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-18 05:39:50 +08:00
* refactor(docker): rename server image to gateway Rename Dockerfile.server to Dockerfile.gateway and update all image references from openshell/server to openshell/gateway across Helm charts, Kubernetes manifests, mise tasks, build/deploy scripts, CI workflows, and documentation. The underlying Rust binary (navigator-server) is unchanged -- this rename only affects the Docker image name and Dockerfile. * fix: catch remaining server->gateway references in docs and comments
75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
name: Docker Build
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
component:
|
|
description: "Component to build (gateway, sandbox, cluster)"
|
|
required: true
|
|
type: string
|
|
timeout-minutes:
|
|
description: "Job timeout in minutes"
|
|
required: false
|
|
type: number
|
|
default: 20
|
|
push:
|
|
description: "Push image to registry"
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
|
|
env:
|
|
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SCCACHE_MEMCACHED_ENDPOINT: ${{ vars.SCCACHE_MEMCACHED_ENDPOINT }}
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Build ${{ inputs.component }}
|
|
runs-on: build-amd64
|
|
timeout-minutes: ${{ inputs.timeout-minutes }}
|
|
container:
|
|
image: ghcr.io/nvidia/openshell/ci:latest
|
|
credentials:
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
options: --privileged
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
env:
|
|
IMAGE_TAG: ${{ github.sha }}
|
|
IMAGE_REGISTRY: ghcr.io/nvidia/openshell
|
|
DOCKER_PUSH: ${{ inputs.push && '1' || '0' }}
|
|
DOCKER_PLATFORM: linux/amd64,linux/arm64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Mark workspace safe for git
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: Fetch tags
|
|
run: git fetch --tags --force
|
|
|
|
- name: Compute cargo version
|
|
id: version
|
|
run: |
|
|
set -eu
|
|
echo "cargo_version=$(uv run python tasks/scripts/release.py get-version --cargo)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Log in to GHCR
|
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: ./.github/actions/setup-buildx
|
|
|
|
- name: Build ${{ inputs.component }} image
|
|
env:
|
|
DOCKER_BUILDER: navigator
|
|
OPENSHELL_CARGO_VERSION: ${{ steps.version.outputs.cargo_version }}
|
|
run: mise run --no-prepare docker:build:${{ inputs.component }}
|