Archive builder image for publish workflow

Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>
pull/4973/head^2
quicksilver 2020-11-02 10:42:09 +08:00 committed by yefu.chen
parent 10217f9485
commit 832a880684
3 changed files with 50 additions and 1 deletions

1
.env
View File

@ -1,3 +1,4 @@
REPO=milvusdb/milvus-distributed-dev
ARCH=amd64
UBUNTU=18.04
SHOW_DATE=none

48
.github/workflows/publish-builder.yaml vendored Normal file
View File

@ -0,0 +1,48 @@
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/**'
- '.github/workflows/publish-builder.yaml'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/**'
- '.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: Docker Build
shell: bash
run: |
SHOW_DATE=`date +%Y%m%d-%H%M%S` 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 }}
SHOW_DATE=`date +%Y%m%d-%H%M%S` docker-compose push ubuntu

View File

@ -9,7 +9,7 @@ x-ccache: &ccache
services:
ubuntu:
image: ${REPO}:${ARCH}-ubuntu${UBUNTU}
image: ${REPO}:${ARCH}-ubuntu${UBUNTU}-${SHOW_DATE}
build:
context: .
dockerfile: build/docker/env/cpu/ubuntu${UBUNTU}/Dockerfile