mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-09 14:52:58 +00:00
* refactor: use '--output type=local' in 'build-greptime-by-buildx' target to reduce unnecessary 'docker cp'" Signed-off-by: zyy17 <zyylsxm@gmail.com> * refactor: improve the image building performance * ci: release centos dev builder * ci: use 'make build-by-dev-builder' to improve docker build performance * refactor: add 'which' command in centos * fix: add 'OUTPUT_DIR' to fix 'make docker-image-buildx' error * fix: fix incorrect dockerfile path Signed-off-by: zyy17 <zyylsxm@gmail.com> * refactor: remove configure-aws-credentials action and use env variables Signed-off-by: zyy17 <zyylsxm@gmail.com> * ci: update slack notification prompt * refactor: clean up the target directory before building artifacts of centos7 --------- Signed-off-by: zyy17 <zyylsxm@gmail.com>
94 lines
3.4 KiB
YAML
94 lines
3.4 KiB
YAML
name: Build and push dev-builder image
|
|
description: Build and push dev-builder image to DockerHub and ACR
|
|
inputs:
|
|
dockerhub-image-registry:
|
|
description: The dockerhub image registry to store the images
|
|
required: false
|
|
default: docker.io
|
|
dockerhub-image-registry-username:
|
|
description: The dockerhub username to login to the image registry
|
|
required: true
|
|
dockerhub-image-registry-token:
|
|
description: The dockerhub token to login to the image registry
|
|
required: true
|
|
dockerhub-image-namespace:
|
|
description: The dockerhub namespace of the image registry to store the images
|
|
required: false
|
|
default: greptime
|
|
acr-image-registry:
|
|
description: The ACR image registry to store the images
|
|
required: true
|
|
acr-image-registry-username:
|
|
description: The ACR username to login to the image registry
|
|
required: true
|
|
acr-image-registry-password:
|
|
description: The ACR password to login to the image registry
|
|
required: true
|
|
acr-image-namespace:
|
|
description: The ACR namespace of the image registry to store the images
|
|
required: false
|
|
default: greptime
|
|
version:
|
|
description: Version of the dev-builder
|
|
required: false
|
|
default: latest
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Login to Dockerhub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ${{ inputs.dockerhub-image-registry }}
|
|
username: ${{ inputs.dockerhub-image-registry-username }}
|
|
password: ${{ inputs.dockerhub-image-registry-token }}
|
|
|
|
- name: Build and push ubuntu dev builder image to dockerhub
|
|
shell: bash
|
|
run:
|
|
make dev-builder \
|
|
BASE_IMAGE=ubuntu \
|
|
BUILDX_MULTI_PLATFORM_BUILD=true \
|
|
IMAGE_REGISTRY=${{ inputs.dockerhub-image-registry }} \
|
|
IMAGE_NAMESPACE=${{ inputs.dockerhub-image-namespace }} \
|
|
IMAGE_TAG=${{ inputs.version }}
|
|
|
|
- name: Build and push centos dev builder image to dockerhub
|
|
shell: bash
|
|
run:
|
|
make dev-builder \
|
|
BASE_IMAGE=centos \
|
|
BUILDX_MULTI_PLATFORM_BUILD=true \
|
|
IMAGE_REGISTRY=${{ inputs.dockerhub-image-registry }} \
|
|
IMAGE_NAMESPACE=${{ inputs.dockerhub-image-namespace }} \
|
|
IMAGE_TAG=${{ inputs.version }}
|
|
|
|
- name: Login to ACR
|
|
uses: docker/login-action@v2
|
|
continue-on-error: true
|
|
with:
|
|
registry: ${{ inputs.acr-image-registry }}
|
|
username: ${{ inputs.acr-image-registry-username }}
|
|
password: ${{ inputs.acr-image-registry-password }}
|
|
|
|
- name: Build and push ubuntu dev builder image to ACR
|
|
shell: bash
|
|
continue-on-error: true
|
|
run: # buildx will cache the images that already built, so it will not take long time to build the images again.
|
|
make dev-builder \
|
|
BASE_IMAGE=ubuntu \
|
|
BUILDX_MULTI_PLATFORM_BUILD=true \
|
|
IMAGE_REGISTRY=${{ inputs.acr-image-registry }} \
|
|
IMAGE_NAMESPACE=${{ inputs.acr-image-namespace }} \
|
|
IMAGE_TAG=${{ inputs.version }}
|
|
|
|
- name: Build and push centos dev builder image to ACR
|
|
shell: bash
|
|
continue-on-error: true
|
|
run: # buildx will cache the images that already built, so it will not take long time to build the images again.
|
|
make dev-builder \
|
|
BASE_IMAGE=centos \
|
|
BUILDX_MULTI_PLATFORM_BUILD=true \
|
|
IMAGE_REGISTRY=${{ inputs.acr-image-registry }} \
|
|
IMAGE_NAMESPACE=${{ inputs.acr-image-namespace }} \
|
|
IMAGE_TAG=${{ inputs.version }}
|