2022-06-09 11:04:06 +08:00
|
|
|
name: Weekly Release
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# * is a special character in YAML so you have to quote this string
|
|
|
|
# ┌───────────── minute (0 - 59)
|
|
|
|
# │ ┌───────────── hour (0 - 23)
|
|
|
|
# │ │ ┌───────────── day of the month (1 - 31)
|
|
|
|
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
|
|
|
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
|
|
|
# │ │ │ │ │
|
|
|
|
# │ │ │ │ │
|
|
|
|
# │ │ │ │ │
|
2022-06-24 17:26:38 +08:00
|
|
|
- cron: '0 0 * * 2,5'
|
2022-06-09 11:04:06 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
nightly:
|
|
|
|
name: Run Weekly Release
|
|
|
|
if: github.repository == 'milvus-io/milvus'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
IMAGE_REPO: "milvusdb"
|
2022-06-30 15:20:22 +08:00
|
|
|
DEV: "milvus"
|
2022-06-09 11:04:06 +08:00
|
|
|
WEEKLY: "weekly-build"
|
|
|
|
TAG_PREFIX: "master-"
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: '0'
|
|
|
|
|
|
|
|
- name: Get the latest of Milvus dev image tag
|
|
|
|
shell: bash
|
|
|
|
working-directory: scripts
|
|
|
|
run: echo "tag=$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/${DEV} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
|
2022-06-30 15:20:22 +08:00
|
|
|
- name: Pull latest milvus image with tag prefix master-
|
2022-06-09 11:04:06 +08:00
|
|
|
run: |
|
|
|
|
docker pull "${IMAGE_REPO}/${DEV}:${{ env.tag }}"
|
|
|
|
docker tag "${IMAGE_REPO}/${DEV}:${{ env.tag }}" "${IMAGE_REPO}/${WEEKLY}:${{ env.tag }}"
|
|
|
|
|
|
|
|
- name: Log in to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USER }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Push Docker image
|
|
|
|
run: |
|
|
|
|
docker push "${IMAGE_REPO}/${WEEKLY}:${{ env.tag }}"
|
|
|
|
|
|
|
|
- name: Set release build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
tag=${{ env.tag }}
|
|
|
|
IFS=- read branch date sha <<< "$tag"
|
|
|
|
echo "build=$date" >> $GITHUB_ENV
|
|
|
|
echo "sha=$(git rev-parse $sha)" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Create a weekly release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
body: "Image: ${{ env.IMAGE_REPO}}/${{ env.WEEKLY }}:${{ env.tag }}"
|
|
|
|
prerelease: true
|
2022-10-20 10:09:28 +08:00
|
|
|
tag_name: "v2.2-testing-${{ env.build }}"
|
|
|
|
release_name: "milvus-2.2-testing-${{ env.build }}"
|
2022-06-09 11:04:06 +08:00
|
|
|
commitish: "${{ env.sha }}"
|
|
|
|
|
|
|
|
|