mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
7ab5b5d80d
Signed-off-by: godchen <qingxiang.chen@zilliz.com>
58 lines
2.0 KiB
YAML
58 lines
2.0 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/env/**'
|
|
- '.github/workflows/publish-builder.yaml'
|
|
pull_request:
|
|
# file paths to consider in the event. Optional; defaults to all.
|
|
paths:
|
|
- 'build/docker/env/**'
|
|
- '.github/workflows/publish-builder.yaml'
|
|
|
|
jobs:
|
|
publish-builder:
|
|
name: AMD64 Ubuntu ${{ matrix.ubuntu }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
ubuntu: [18.04]
|
|
env:
|
|
UBUNTU: ${{ matrix.ubuntu }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Check Dockerfile
|
|
uses: reviewdog/action-hadolint@v1
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
reporter: github-pr-check # Default is github-pr-check
|
|
hadolint_ignore: DL3008
|
|
- 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=latest docker-compose pull --ignore-pull-failures ubuntu
|
|
- name: Docker Build
|
|
shell: bash
|
|
run: |
|
|
DATE_VERSION=${{ steps.extracter.outputs.version }} docker-compose build ubuntu
|
|
DATE_VERSION=latest docker-compose build ubuntu
|
|
- name: Docker Push
|
|
if: success() && github.event_name == 'push' && github.repository == 'zilliztech/milvus-distributed'
|
|
continue-on-error: true
|
|
shell: bash
|
|
run: |
|
|
docker login -u ${{ secrets.DOCKERHUB_USER }} \
|
|
-p ${{ secrets.DOCKERHUB_TOKEN }}
|
|
DATE_VERSION=${{ steps.extracter.outputs.version }} docker-compose push ubuntu
|
|
DATE_VERSION=latest docker-compose push ubuntu
|