Skip to content

support to ignore error when delete a task #7

support to ignore error when delete a task

support to ignore error when delete a task #7

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build-linux-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache-dependency-path: server/go.sum
cache: true
- uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
workdir: ./server
version: '~> v2'
args: release --skip publish --config .goreleaser-linux.yaml
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: milvus-cdc-linux
path: |
server/dist/milvus-cdc*
server/dist/checksums.txt
build-darwin-binary:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache-dependency-path: server/go.sum
cache: true
- uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
workdir: ./server
version: '~> v2'
args: release --skip publish --config .goreleaser-darwin.yaml
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: milvus-cdc-darwin
path: |
server/dist/milvus-cdc*
server/dist/checksums.txt
merge-and-release:
needs: [build-linux-binary, build-darwin-binary]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache-dependency-path: server/go.sum
cache: true
- name: Make directories
run: |
mkdir -p ./milvus-cdc-build/linux
mkdir -p ./milvus-cdc-build/darwin
- name: Download linux binaries
uses: actions/download-artifact@v3
with:
name: milvus-cdc-linux
path: ./milvus-cdc-build/linux
- name: Download darwin binaries
uses: actions/download-artifact@v3
with:
name: milvus-cdc-darwin
path: ./milvus-cdc-build/darwin
- name: Merge checksum file
run: |
cd ./milvus-cdc-build
cat ./darwin/checksums.txt >> checksums.txt
cat ./linux/checksums.txt >> checksums.txt
rm ./darwin/checksums.txt
rm ./linux/checksums.txt
- name: Check git status
run: |
tree
git status
- name: Release
uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
args: release --clean --config .goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Docker Login
uses: docker/login-action@v2
with:
username: milvusdb
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push docker image
run: |
tag=$(git tag --sort=-version:refname | head -1)
docker build --build-arg GIT_COMMIT_ARG=$(git rev-parse --short HEAD) -t milvusdb/milvus-cdc:$tag -t milvusdb/milvus-cdc:latest .
docker push milvusdb/milvus-cdc:$tag
docker push milvusdb/milvus-cdc:latest