mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-18 05:39:50 +08:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: CI Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'deploy/docker/Dockerfile.ci'
|
|
- 'mise.toml'
|
|
- 'tasks/**'
|
|
- '.github/workflows/ci-image.yml'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
CI_IMAGE: ghcr.io/nvidia/openshell/ci
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build-ci-image:
|
|
name: Build
|
|
runs-on: build-amd64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: ./.github/actions/setup-buildx
|
|
|
|
- name: Build and push CI image
|
|
run: |
|
|
docker buildx build \
|
|
--platform linux/amd64,linux/arm64 \
|
|
--build-arg MISE_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
|
|
--push \
|
|
-t ${{ env.CI_IMAGE }}:${{ github.sha }} \
|
|
-t ${{ env.CI_IMAGE }}:latest \
|
|
-f deploy/docker/Dockerfile.ci \
|
|
.
|