Files
qdrant/.github/workflows/docker-image.yml
dependabot[bot] 74b681f6b6 Bump Swatinem/rust-cache from 1 to 2 (#1232)
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 1 to 2.
- [Release notes](https://github.com/Swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Swatinem/rust-cache/compare/v1...v2)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-21 21:01:59 +01:00

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