1515 description : ' runner array in json format (e.g. ["ubuntu-latest"] or ["self-hosted"])'
1616 required : true
1717 default : ' []'
18+ app_version :
19+ description : ' Docker image tag to build and deploy (e.g. v1.7.1)'
20+ required : true
21+ default : ' latest'
22+ type : string
1823
1924jobs :
2025 build-main :
2328 - name : Checkout code
2429 uses : actions/checkout@v4
2530 - name : Build main application image
26- run : docker build --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua -t nexent/nexent -f make/main/Dockerfile .
31+ run : docker build --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua -t nexent/nexent:${{ github.event.inputs.app_version }} -t nexent/nexent -f make/main/Dockerfile .
2732
2833 build-data-process :
2934 runs-on : ${{ fromJson(inputs.runner_label_json) }}
@@ -47,23 +52,23 @@ jobs:
4752 GIT_TRACE=1 GIT_CURL_VERBOSE=1 GIT_LFS_LOG=debug git lfs pull
4853 rm -rf .git .gitattributes
4954 - name : Build data process image
50- run : docker build --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua -t nexent/nexent-data-process -f make/data_process/Dockerfile .
55+ run : docker build --build-arg MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple --build-arg APT_MIRROR=tsinghua -t nexent/nexent-data-process:${{ github.event.inputs.app_version }} -t nexent/nexent-data-process -f make/data_process/Dockerfile .
5156
5257 build-web :
5358 runs-on : ${{ fromJson(inputs.runner_label_json) }}
5459 steps :
5560 - name : Checkout code
5661 uses : actions/checkout@v4
5762 - name : Build web frontend image
58- run : docker build --build-arg MIRROR=https://registry.npmmirror.com --build-arg APK_MIRROR=tsinghua -t nexent/nexent-web -f make/web/Dockerfile .
63+ run : docker build --build-arg MIRROR=https://registry.npmmirror.com --build-arg APK_MIRROR=tsinghua -t nexent/nexent-web:${{ github.event.inputs.app_version }} -t nexent/nexent-web -f make/web/Dockerfile .
5964
6065 build-docs :
6166 runs-on : ${{ fromJson(inputs.runner_label_json) }}
6267 steps :
6368 - name : Checkout code
6469 uses : actions/checkout@v4
6570 - name : Build docs image
66- run : docker build --progress=plain -t nexent/nexent-docs -f make/docs/Dockerfile .
71+ run : docker build --progress=plain -t nexent/nexent-docs:${{ github.event.inputs.app_version }} -t nexent/nexent-docs -f make/docs/Dockerfile .
6772
6873 deploy :
6974 runs-on : ${{ fromJson(inputs.runner_label_json) }}
7681 rm -rf $HOME/nexent
7782 mkdir -p $HOME/nexent
7883 cp -r $GITHUB_WORKSPACE/* $HOME/nexent/
84+ - name : Force APP_VERSION to latest in deploy.sh (CI only)
85+ run : |
86+ sed -i 's/APP_VERSION="$(get_app_version)"/APP_VERSION="${{ github.event.inputs.app_version }}"/' $HOME/nexent/docker/deploy.sh
7987 - name : Start docs container
8088 run : |
8189 docker stop nexent-docs 2>/dev/null || true
0 commit comments