mirror of
https://github.com/qdrant/qdrant.git
synced 2026-09-27 08:27:40 -05:00
* Refactor Dockerfile - fix cross-compilation - improve caching TODO: - check if `lld` is used/works for linkage (and enable if not used, or remove if doesn't work) * Remove `aarch64` linker config from `.cargo/config.toml` (seems to be unnecessary) * Expose `LINKER` argument and enable `lld` linker * Add `mold` linker support * Document Dockerfile * Add closing ` in the Dockerfile comments Co-authored-by: Tim Visée <tim+github@visee.me> --------- Co-authored-by: Tim Visée <tim+github@visee.me>
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build and deploy docker image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
# Pattern matched against refs/tags
|
|
tags:
|
|
- '*' # Push events to every tag not containing /
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Get current tag
|
|
id: vars
|
|
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
|
|
- name: Build the Docker image
|
|
env:
|
|
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
|
|
run: |
|
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
docker buildx create --use
|
|
|
|
docker login --username generall --password ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
DOCKERHUB_TAG="qdrant/qdrant:${{ github.ref_name }}"
|
|
TAGS="-t ${DOCKERHUB_TAG}"
|
|
|
|
DOCKERHUB_TAG_LATEST="qdrant/qdrant:latest"
|
|
TAGS="${TAGS} -t ${DOCKERHUB_TAG_LATEST}"
|
|
|
|
GITHUB_TAG="docker.pkg.github.com/qdrant/qdrant/qdrant:${{ github.ref_name }}"
|
|
|
|
docker buildx build --platform='linux/amd64,linux/arm64' $TAGS --push .
|
|
|
|
docker pull $DOCKERHUB_TAG
|
|
|
|
docker login https://docker.pkg.github.com -u qdrant --password ${{ secrets.GITHUB_TOKEN }}
|
|
docker tag $DOCKERHUB_TAG $GITHUB_TAG
|
|
docker push $GITHUB_TAG
|