2020-11-02 10:42:09 +08:00
|
|
|
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:
|
2020-12-03 19:00:11 +08:00
|
|
|
- 'build/docker/env/**'
|
2020-11-02 10:42:09 +08:00
|
|
|
- '.github/workflows/publish-builder.yaml'
|
|
|
|
pull_request:
|
|
|
|
# file paths to consider in the event. Optional; defaults to all.
|
|
|
|
paths:
|
2020-12-03 19:00:11 +08:00
|
|
|
- 'build/docker/env/**'
|
2020-11-02 10:42:09 +08:00
|
|
|
- '.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
|
2021-03-25 14:41:46 +08:00
|
|
|
uses: reviewdog/action-hadolint@v1.16.1
|
2020-11-02 10:42:09 +08:00
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
reporter: github-pr-check # Default is github-pr-check
|
|
|
|
hadolint_ignore: DL3008
|
2020-11-02 18:49:11 +08:00
|
|
|
- name: Get version from system time after release step
|
|
|
|
id: extracter
|
|
|
|
run: echo "::set-output name=version::$(date +%Y%m%d-%H%M%S)"
|
2020-11-17 15:06:48 +08:00
|
|
|
- name: Docker Pull
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-02-25 19:22:21 +08:00
|
|
|
docker-compose pull --ignore-pull-failures ubuntu
|
2020-11-02 10:42:09 +08:00
|
|
|
- name: Docker Build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-11-13 12:27:41 +08:00
|
|
|
DATE_VERSION=${{ steps.extracter.outputs.version }} docker-compose build ubuntu
|
2020-11-17 15:06:48 +08:00
|
|
|
DATE_VERSION=latest docker-compose build ubuntu
|
2020-11-02 10:42:09 +08:00
|
|
|
- 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 }}
|
2020-11-13 12:27:41 +08:00
|
|
|
DATE_VERSION=${{ steps.extracter.outputs.version }} docker-compose push ubuntu
|
2020-11-17 15:06:48 +08:00
|
|
|
DATE_VERSION=latest docker-compose push ubuntu
|