add semver tags

This commit is contained in:
OlivierDehaene 2023-02-03 12:30:01 +01:00
parent 87dfc4e2c1
commit a5632a6a24

View File

@ -5,6 +5,8 @@ on:
push: push:
branches: branches:
- 'main' - 'main'
tags:
- 'v*'
pull_request: pull_request:
branches: branches:
- 'main' - 'main'
@ -43,6 +45,8 @@ jobs:
ghcr.io/huggingface/text-generation-inference ghcr.io/huggingface/text-generation-inference
registry.internal.huggingface.tech/api-inference/community/text-generation-inference registry.internal.huggingface.tech/api-inference/community/text-generation-inference
tags: | tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }} type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }}
- name: Build and push Docker image - name: Build and push Docker image