mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-17 12:13:35 +00:00
Fix docker image tag with semantic version for releases (#2548)
* Fix docker tag with semantic version for releases * Prepend latest docker tag with tagprefix in cache-from
This commit is contained in:
parent
2b11981b08
commit
a2a99f79b1
10
.github/workflows/docker_build.yml
vendored
10
.github/workflows/docker_build.yml
vendored
@ -5,6 +5,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -36,12 +38,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
${{ matrix.repository }}
|
${{ matrix.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=tag,prefix=${{ matrix.tagprefix }}
|
type=semver,pattern={{version}},prefix=${{ matrix.tagprefix }}
|
||||||
type=sha,format=long,prefix=${{ matrix.tagprefix }}
|
type=sha,format=long,prefix=${{ matrix.tagprefix }}
|
||||||
type=sha,format=long,prefix=,enable=${{ matrix.default }}
|
type=sha,format=long,prefix=,enable=${{ matrix.default }}
|
||||||
type=raw,value=latest,prefix=${{ matrix.tagprefix }}
|
type=raw,value=latest,prefix=${{ matrix.tagprefix }}
|
||||||
@ -57,10 +59,10 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push docker image
|
- name: Build and push docker image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
file: ${{ matrix.dockerfile }}
|
file: ${{ matrix.dockerfile }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
push: true
|
push: true
|
||||||
cache-from: type=registry,ref=${{ matrix.repository }}:latest
|
cache-from: type=registry,ref=${{ matrix.repository }}:${{ matrix.tagprefix }}latest
|
||||||
cache-to: type=inline
|
cache-to: type=inline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user