diff --git a/.github/actions/build-images/action.yml b/.github/actions/build-images/action.yml index 9045fd5629..88196a5748 100644 --- a/.github/actions/build-images/action.yml +++ b/.github/actions/build-images/action.yml @@ -7,6 +7,10 @@ inputs: image-namespace: description: The namespace of the image registry to store the images required: true + image-name: + description: The name of the image to build + required: false + default: greptimedb image-registry-username: description: The username to login to the image registry required: true @@ -29,12 +33,12 @@ runs: steps: - name: Build and push standard images to dockerhub uses: ./.github/actions/build-greptime-images - with: + with: # The image will be used as '${{ inputs.image-registry }}/${{ inputs.image-namespace }}/${{ inputs.image-name }}:${{ inputs.version }}' image-registry: ${{ inputs.image-registry }} image-namespace: ${{ inputs.image-namespace }} image-registry-username: ${{ inputs.image-registry-username }} image-registry-password: ${{ inputs.image-registry-password }} - image-name: greptimedb + image-name: ${{ inputs.image-name }} image-tag: ${{ inputs.version }} docker-file: docker/ci/Dockerfile amd64-artifact-name: greptime-linux-amd64-pyo3-${{ inputs.version }} @@ -50,7 +54,7 @@ runs: image-namespace: ${{ inputs.image-namespace }} image-registry-username: ${{ inputs.image-registry-username }} image-registry-password: ${{ inputs.image-registry-password }} - image-name: greptimedb-centos + image-name: ${{ inputs.image-name }}-centos image-tag: ${{ inputs.version }} docker-file: docker/ci/Dockerfile-centos amd64-artifact-name: greptime-linux-amd64-centos-${{ inputs.version }} diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 4dca408909..594f2d767e 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -68,8 +68,8 @@ env: NIGHTLY_RELEASE_PREFIX: nightly - # Use the different image namespace to avoid conflict with the release images. - IMAGE_NAMESPACE: greptimedb-dev + # Use the different image name to avoid conflict with the release images. + IMAGE_NAME: greptimedb-dev jobs: allocate-runners: @@ -229,7 +229,8 @@ jobs: uses: ./.github/actions/build-images with: image-registry: docker.io - image-namespace: ${{ env.IMAGE_NAMESPACE }} + image-namespace: ${{ vars.IMAGE_NAMESPACE }} + image-name: ${{ env.IMAGE_NAME }} image-registry-username: ${{ secrets.DOCKERHUB_USERNAME }} image-registry-password: ${{ secrets.DOCKERHUB_TOKEN }} version: ${{ needs.allocate-runners.outputs.version }} @@ -263,7 +264,8 @@ jobs: uses: ./.github/actions/build-images with: image-registry: ${{ vars.ACR_IMAGE_REGISTRY }} - image-namespace: ${{ env.IMAGE_NAMESPACE }} + image-namespace: ${{ vars.IMAGE_NAMESPACE }} + image-name: ${{ env.IMAGE_NAME }} image-registry-username: ${{ secrets.ALICLOUD_USERNAME }} image-registry-password: ${{ secrets.ALICLOUD_PASSWORD }} version: ${{ needs.allocate-runners.outputs.version }}