mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
7d920e9c9c
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
name: Publish Builder
|
|
# 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/builder/**'
|
|
- '.github/workflows/publish-builder.yaml'
|
|
pull_request:
|
|
# file paths to consider in the event. Optional; defaults to all.
|
|
paths:
|
|
- 'build/docker/builder/**'
|
|
- '.github/workflows/publish-builder.yaml'
|
|
|
|
jobs:
|
|
publish-builder:
|
|
name: AMD64 ${{ matrix.os }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu18.04]
|
|
env:
|
|
OS_NAME: ${{ matrix.os }}
|
|
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-%H%M%S)"
|
|
- name: Docker Pull
|
|
shell: bash
|
|
run: |
|
|
DATE_VERSION=${{matrix.os}}-latest docker-compose pull --ignore-pull-failures builder
|
|
- name: Docker Build
|
|
shell: bash
|
|
run: |
|
|
DATE_VERSION=${{matrix.os}}-latest docker-compose build builder
|
|
DATE_VERSION=${{matrix.os}}-${{ steps.extracter.outputs.version }} docker-compose build builder
|
|
- 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 }}
|
|
DATE_VERSION=${{matrix.os}}-latest docker-compose push builder
|
|
DATE_VERSION=${{matrix.os}}-${{ steps.extracter.outputs.version }} docker-compose push builder
|