Files
qdrant/.github/workflows/docker-image.yml
dependabot[bot] 7275577102 Bump actions/checkout from 2 to 3 (#390)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-18 12:01:30 +01:00

34 lines
1.2 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@v1
- 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 login https://docker.pkg.github.com -u qdrant --password ${{ secrets.GITHUB_TOKEN }}
docker build . --file Dockerfile --tag "docker.pkg.github.com/qdrant/qdrant/qdrant:$RELEASE_VERSION"
docker push "docker.pkg.github.com/qdrant/qdrant/qdrant:$RELEASE_VERSION"
docker login --username generall --password ${{ secrets.DOCKERHUB_TOKEN }}
docker tag "docker.pkg.github.com/qdrant/qdrant/qdrant:$RELEASE_VERSION" "generall/qdrant:$RELEASE_VERSION"
docker push "generall/qdrant:$RELEASE_VERSION"
docker tag "generall/qdrant:$RELEASE_VERSION" "generall/qdrant:latest"
docker push "generall/qdrant:latest"