ci(xpu): checkout deadicated dir for night build (#27703)
This commit is contained in:
@@ -1,57 +1,59 @@
|
|||||||
name: Release Docker Images Nightly (Intel XPU)
|
name: Release Docker Images Nightly (Intel XPU)
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 12 * * *'
|
- cron: '0 12 * * *'
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
if: github.repository == 'sgl-project/sglang'
|
if: github.repository == 'sgl-project/sglang'
|
||||||
runs-on: intel-bmg
|
runs-on: intel-bmg
|
||||||
environment: 'prod'
|
environment: 'prod'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
path: sglang-nightly-build
|
||||||
|
fetch-depth: 0
|
||||||
- name: Set date and commit hash
|
|
||||||
id: image_meta
|
- name: Set date and commit hash
|
||||||
run: |
|
id: image_meta
|
||||||
date_tag=$(date +%Y%m%d)
|
run: |
|
||||||
commit_hash=$(git rev-parse --short=7 HEAD)
|
cd sglang-nightly-build
|
||||||
if [ -z "${commit_hash}" ]; then
|
date_tag=$(date +%Y%m%d)
|
||||||
echo "::error::Could not resolve commit hash"
|
commit_hash=$(git rev-parse --short=7 HEAD)
|
||||||
exit 1
|
if [ -z "${commit_hash}" ]; then
|
||||||
fi
|
echo "::error::Could not resolve commit hash"
|
||||||
image_tag="nightly-dev-xpu-bmg-${date_tag}-${commit_hash}"
|
exit 1
|
||||||
echo "DATE=${date_tag}" >> $GITHUB_ENV
|
fi
|
||||||
echo "commit_hash=${commit_hash}" >> $GITHUB_OUTPUT
|
image_tag="nightly-dev-xpu-bmg-${date_tag}-${commit_hash}"
|
||||||
echo "IMAGE_TAG=${image_tag}" >> $GITHUB_ENV
|
echo "DATE=${date_tag}" >> $GITHUB_ENV
|
||||||
echo "Image tag: ${image_tag}"
|
echo "commit_hash=${commit_hash}" >> $GITHUB_OUTPUT
|
||||||
|
echo "IMAGE_TAG=${image_tag}" >> $GITHUB_ENV
|
||||||
- name: Login to Docker Hub (Intel)
|
echo "Image tag: ${image_tag}"
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
- name: Login to Docker Hub (Intel)
|
||||||
username: ${{ secrets.DOCKERHUB_INTEL_USERNAME }}
|
uses: docker/login-action@v2
|
||||||
password: ${{ secrets.DOCKERHUB_INTEL_TOKEN }}
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_INTEL_USERNAME }}
|
||||||
- name: Build intel/sglang-dev
|
password: ${{ secrets.DOCKERHUB_INTEL_TOKEN }}
|
||||||
run: |
|
|
||||||
echo "Building intel/sglang-dev:${{ env.IMAGE_TAG }}"
|
- name: Build intel/sglang-dev
|
||||||
docker build . \
|
run: |
|
||||||
-f docker/xpu.Dockerfile \
|
echo "Building intel/sglang-dev:${{ env.IMAGE_TAG }}"
|
||||||
--build-arg SG_LANG_REPO=https://github.com/sgl-project/sglang.git \
|
docker build sglang-nightly-build \
|
||||||
--build-arg SG_LANG_BRANCH=main \
|
-f sglang-nightly-build/docker/xpu.Dockerfile \
|
||||||
--no-cache --progress=plain \
|
--build-arg SG_LANG_REPO=https://github.com/sgl-project/sglang.git \
|
||||||
-t "intel/sglang-dev:${{ env.IMAGE_TAG }}" \
|
--build-arg SG_LANG_BRANCH=main \
|
||||||
-t "intel/sglang-dev:latest"
|
--no-cache --progress=plain \
|
||||||
|
-t "intel/sglang-dev:${{ env.IMAGE_TAG }}" \
|
||||||
- name: Push intel/sglang-dev
|
-t "intel/sglang-dev:latest"
|
||||||
run: |
|
|
||||||
docker push "intel/sglang-dev:${{ env.IMAGE_TAG }}"
|
- name: Push intel/sglang-dev
|
||||||
docker push "intel/sglang-dev:latest"
|
run: |
|
||||||
|
docker push "intel/sglang-dev:${{ env.IMAGE_TAG }}"
|
||||||
|
docker push "intel/sglang-dev:latest"
|
||||||
|
|||||||
Reference in New Issue
Block a user