Skip to content

add action

add action #2

Workflow file for this run

name: Qdrant-BR
on:
push:
tags:
- '*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU # 这个步骤添加了QEMU支持
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} # 使用访问令牌进行身份验证
# Parse the version from github.ref (e.g., refs/tags/v1.0.0 => v1.0.0)
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: . # 使用当前目录作为上下文
file: Dockerfile # Dockerfile的位置
push: true # 推送镜像到Docker Hub
tags:
datamini/qdrant-br:${{ env.VERSION }},datamini/qdrant-br:latest
platforms: linux/amd64,linux/arm64