mirror of
https://github.com/CloudNebulaProject/barycenter.git
synced 2026-04-10 13:10:42 +00:00
fix(ci): prevent invalid Docker tags for pre-release versions
Disable major and minor version tags for pre-release versions (alpha, beta, rc) since semver pattern extraction doesn't work correctly with pre-release suffixes. This fixes the error: ERROR: failed to build: invalid tag "ghcr.io/.../barycenter:-1171167" Pre-release versions will now only get: - Full version tag: v0.2.0-alpha.1 - SHA tag: main-<sha> Stable releases will continue to get all tags: - Full version: v1.0.0 - Major.minor: 1.0 - Major: 1 - SHA: main-<sha> Also added missing id to build step for attestation.
This commit is contained in:
parent
11711677da
commit
ea876be242
1 changed files with 3 additions and 2 deletions
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
|
|
@ -38,8 +38,8 @@ jobs:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}},enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') && !contains(github.ref_name, 'rc') }}
|
||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}},enable=${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') && !contains(github.ref_name, 'rc') }}
|
||||||
type=sha,prefix={{branch}}-
|
type=sha,prefix={{branch}}-
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.title=Barycenter
|
org.opencontainers.image.title=Barycenter
|
||||||
|
|
@ -47,6 +47,7 @@ jobs:
|
||||||
org.opencontainers.image.vendor=${{ github.repository_owner }}
|
org.opencontainers.image.vendor=${{ github.repository_owner }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
|
id: build
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue