name: Publish Test 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/test/**' - '.github/workflows/publish-test-images.yaml' pull_request: # file paths to consider in the event. Optional; defaults to all. paths: - 'build/docker/test/**' - '.github/workflows/publish-test-images.yaml' jobs: publish-pytest-images: name: PyTest runs-on: ubuntu-latest timeout-minutes: 60 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)" echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - name: Docker Pull shell: bash working-directory: build/docker/test run: | docker-compose pull --ignore-pull-failures regression_standalone - name: Docker Build shell: bash working-directory: build/docker/test run: | TARGET_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker-compose build regression_standalone TARGET_TAG=latest docker-compose build regression_standalone - name: Docker Push if: success() && github.event_name == 'push' && github.repository == 'zilliztech/milvus-distributed' continue-on-error: true shell: bash working-directory: build/docker/test run: | docker login -u ${{ secrets.DOCKERHUB_USER }} \ -p ${{ secrets.DOCKERHUB_TOKEN }} TARGET_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker-compose push regression_standalone TARGET_TAG=latest docker-compose push regression_standalone