[ci] add docker version (#8390)

This commit is contained in:
Yaowei Zheng 2025-06-17 01:37:47 +08:00 committed by GitHub
parent ca75f1edf3
commit ad345ec054

View File

@ -43,6 +43,16 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Get llamafactory version
id: version
run: |
echo "tag=$(python setup.py --version | sed 's/\.dev0//')" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -61,6 +71,8 @@ jobs:
build-args: | build-args: |
EXTRAS=metrics,deepspeed,liger-kernel EXTRAS=metrics,deepspeed,liger-kernel
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: docker.io/hiyouga/llamafactory:latest tags: |
docker.io/hiyouga/llamafactory:latest
docker.io/hiyouga/llamafactory:${{ steps.version.outputs.tag }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max