mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
5d1f784bcb
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
name: Publish KRTE Images
|
|
# TODO: do not trigger action for some document file update
|
|
|
|
# This workflow is triggered on pushes or pull request to the repository.
|
|
on:
|
|
push:
|
|
# file paths to consider in the event. Optional; defaults to all.
|
|
paths:
|
|
- 'build/docker/krte/**'
|
|
- '.github/workflows/publish-krte-images.yaml'
|
|
- '!**.md'
|
|
pull_request:
|
|
# file paths to consider in the event. Optional; defaults to all.
|
|
paths:
|
|
- 'build/docker/krte/**'
|
|
- '.github/workflows/publish-krte-images.yaml'
|
|
- '!**.md'
|
|
|
|
jobs:
|
|
publish-krte-images:
|
|
name: KRTE
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Get version from system time after release step
|
|
id: extracter
|
|
run: |
|
|
echo "::set-output name=version::$(date +%Y%m%d)"
|
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
- name: Docker Build
|
|
shell: bash
|
|
working-directory: build/docker/krte
|
|
run: |
|
|
export TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
|
|
docker build --build-arg IMAGE_ARG="milvusdb/krte:$TAG" --build-arg GO_VERSION=1.15.8 -t "milvusdb/krte:$TAG" .
|
|
- name: Docker Push
|
|
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
docker login -u ${{ secrets.DOCKERHUB_USER }} \
|
|
-p ${{ secrets.DOCKERHUB_TOKEN }}
|
|
export TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
|
|
docker push "milvusdb/krte:$TAG"
|
|
echo "Push krte image Succeeded"
|