Merge pull request #472 from zilliztech/huwei_again #65
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.18 | |
cache: true | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: goreleaser/goreleaser-action@v6 | |
with: | |
# either 'goreleaser' (default) or 'goreleaser-pro': | |
distribution: goreleaser | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
GITHUB_HOMEBREW_TOKEN: ${{ secrets.HOMEBREW_TOKEN }} | |
dockerhub: | |
runs-on: ubuntu-latest | |
needs: goreleaser | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
cache: true | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get build info | |
id: build_info | |
run: | | |
echo "VERSION=$(git describe --tags --always)" >> $GITHUB_OUTPUT | |
echo "COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
echo "DATE=$(date +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
milvusdb/milvus-backup:${{ steps.build_info.outputs.VERSION }} | |
milvusdb/milvus-backup:latest | |
build-args: | | |
VERSION=${{ steps.build_info.outputs.VERSION }} | |
COMMIT=${{ steps.build_info.outputs.COMMIT }} | |
DATE=${{ steps.build_info.outputs.DATE }} |