name: Build Docker Images on: workflow_dispatch: inputs: modelscope_branch: description: 'ModelScope branch to build from' required: true image_type: description: 'The image type to build' required: true modelscope_version: description: 'ModelScope version to use' required: true swift_branch: description: 'SWIFT branch to use' required: true other_params: description: 'Other params in --xxx xxx' required: false jobs: build: runs-on: [modelscope-self-hosted-us] steps: - name: ResetFileMode shell: bash run: | # reset filemode to allow action runner to delete files # generated by root in docker set -e source ~/.bashrc sudo chown -R $USER:$USER $ACTION_RUNNER_DIR - name: Checkout repository uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.modelscope_branch }} - name: Build Docker Image run: | set -e source ~/.bashrc python docker/build_image.py --image_type ${{ github.event.inputs.image_type }} --modelscope_branch ${{ github.event.inputs.modelscope_branch }} --modelscope_version ${{ github.event.inputs.modelscope_version }} --swift_branch ${{ github.event.inputs.swift_branch }} ${{ github.event.inputs.other_params }}