mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 14:54:27 +01:00
Merge #2521
2521: Improve docker CI: push `vX.Y` tag (without patch) to DockerHub (#2507) r=curquiza a=curquiza Following https://github.com/meilisearch/meilisearch/pull/2507 Fixes #2497 Co-authored-by: Janith Petangoda <22471198+janithpet@users.noreply.github.com>
This commit is contained in:
commit
54cd9976d7
15
.github/workflows/publish-docker-images.yml
vendored
15
.github/workflows/publish-docker-images.yml
vendored
@ -27,6 +27,20 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Check tag format
|
||||||
|
id: check-tag-format
|
||||||
|
run: |
|
||||||
|
# Escape submitted tag name
|
||||||
|
escaped_tag=$(printf "%q" ${{ github.ref_name }})
|
||||||
|
|
||||||
|
# Check if tag has format v<nmumber>.<number>.<number> and set output.match
|
||||||
|
# to create a vX.Y (without patch version) Docker tag
|
||||||
|
if [[ $escaped_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo ::set-output name=match::true
|
||||||
|
else
|
||||||
|
echo ::set-output name=match::false
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v3
|
||||||
@ -37,6 +51,7 @@ jobs:
|
|||||||
flavor: latest=false
|
flavor: latest=false
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=tag
|
type=ref,event=tag
|
||||||
|
type=semver,pattern=v{{major}}.{{minor}},enable=${{ steps.check-tag-format.outputs.match }}
|
||||||
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
|
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
|
Loading…
Reference in New Issue
Block a user