Create docker-image.yml

This commit is contained in:
Andrey Vasnetsov
2021-04-06 20:06:51 +02:00
committed by GitHub
parent 93b0c91370
commit 9233bd9b84

26
.github/workflows/docker-image.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Docker Image CI
on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@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 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"