mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-16 19:53:23 +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:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -36,12 +38,12 @@ jobs:
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ matrix.repository }}
|
||||
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=,enable=${{ matrix.default }}
|
||||
type=raw,value=latest,prefix=${{ matrix.tagprefix }}
|
||||
@ -57,10 +59,10 @@ jobs:
|
||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
|
||||
- name: Build and push docker image
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
file: ${{ matrix.dockerfile }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
push: true
|
||||
cache-from: type=registry,ref=${{ matrix.repository }}:latest
|
||||
cache-from: type=registry,ref=${{ matrix.repository }}:${{ matrix.tagprefix }}latest
|
||||
cache-to: type=inline
|
||||
|
Loading…
x
Reference in New Issue
Block a user