mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-06 18:10:58 -05:00
* feat: Print commit id in dev container build workflow * fix: Keep .git while building Qdrant binary in docker * fix: Remove redundant printing of git commit id * fix: Copy only git files first * fix: Docker build should have commit id if present * refactor: Use fewer lines of code * feat: Use git commit id from build arg * refactor: Use cleaner code * Fix string reference issue * fix: Dont print info log if commit is not set * fix: Include git commit id in release containers --------- Co-authored-by: timvisee <tim@visee.me>
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: Push dev branch container to ghcr
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- dev
|
|
|
|
jobs:
|
|
dev-build-and-push:
|
|
runs-on: [self-hosted, linux, x64]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build the Docker image
|
|
run: |
|
|
|
|
# Create build container
|
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
docker buildx create --use
|
|
|
|
# Authenticate on registries
|
|
docker login https://ghcr.io -u qdrant --password ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Build regular image for Github Registry
|
|
GITHUB_TAG="-t ghcr.io/qdrant/qdrant:dev-${{ github.sha }} -t ghcr.io/qdrant/qdrant:dev"
|
|
|
|
# Pull, retag and push to GitHub packages
|
|
docker buildx build --platform='linux/amd64,linux/arm64' --build-arg GIT_COMMIT_ID=${{ github.sha }} $GITHUB_TAG --push --label "org.opencontainers.image.revision"=${{ github.sha }} .
|
|
|
|
docker container rm -f $(docker container ls -qf "name=buildx_buildkit")
|
|
docker volume rm $(docker volume ls -qf "name=buildx_buildkit")
|
|
|