Skip to content

Commit 462e966

Browse files
Merge pull request #4 from killianmuldoon/pr-fix-helm-versioon
fix: use valid tag for helm chart
2 parents efc0d16 + e337722 commit 462e966

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

.github/workflows/build-images.yaml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ jobs:
3030
submodules: recursive
3131
fetch-depth: 0
3232

33+
- name: Determine tag
34+
id: tag
35+
run: |
36+
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
37+
TAG=${GITHUB_REF#refs/tags/}
38+
else
39+
TAG=v25.7.1-${GITHUB_SHA::7}
40+
fi
41+
echo "tag=${TAG}" >> $GITHUB_OUTPUT
42+
3343
- name: Set up QEMU
3444
uses: docker/setup-qemu-action@v3
3545

@@ -44,18 +54,11 @@ jobs:
4454
username: ${{ github.actor }}
4555
password: ${{ secrets.GITHUB_TOKEN }}
4656

47-
- name: Extract metadata (tags, labels)
57+
- name: Extract metadata (labels only)
4858
id: meta
4959
uses: docker/metadata-action@v5
5060
with:
5161
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_UBUNTU }}
52-
tags: |
53-
type=ref,event=branch
54-
type=ref,event=pr
55-
type=semver,pattern={{version}}
56-
type=semver,pattern={{major}}.{{minor}}
57-
type=sha,prefix={{branch}}-
58-
type=raw,value=latest,enable={{is_default_branch}}
5962

6063
- name: Build and push Ubuntu image
6164
uses: docker/build-push-action@v5
@@ -64,7 +67,7 @@ jobs:
6467
file: ./Dockerfile.ovn-kubernetes.ubuntu
6568
platforms: linux/amd64,linux/arm64
6669
push: ${{ github.event_name != 'pull_request' }}
67-
tags: ${{ steps.meta.outputs.tags }}
70+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_UBUNTU }}:${{ steps.tag.outputs.tag }}
6871
labels: ${{ steps.meta.outputs.labels }}
6972
build-args: |
7073
OVN_KUBERNETES_DIR=ovn-kubernetes
@@ -85,6 +88,16 @@ jobs:
8588
submodules: recursive
8689
fetch-depth: 0
8790

91+
- name: Determine tag
92+
id: tag
93+
run: |
94+
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
95+
TAG=${GITHUB_REF#refs/tags/}
96+
else
97+
TAG=v25.7.1-${GITHUB_SHA::7}
98+
fi
99+
echo "tag=${TAG}" >> $GITHUB_OUTPUT
100+
88101
- name: Set up QEMU
89102
uses: docker/setup-qemu-action@v3
90103

@@ -99,18 +112,11 @@ jobs:
99112
username: ${{ github.actor }}
100113
password: ${{ secrets.GITHUB_TOKEN }}
101114

102-
- name: Extract metadata (tags, labels)
115+
- name: Extract metadata (labels only)
103116
id: meta
104117
uses: docker/metadata-action@v5
105118
with:
106119
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_FEDORA }}
107-
tags: |
108-
type=ref,event=branch
109-
type=ref,event=pr
110-
type=semver,pattern={{version}}
111-
type=semver,pattern={{major}}.{{minor}}
112-
type=sha,prefix={{branch}}-
113-
type=raw,value=latest,enable={{is_default_branch}}
114120

115121
- name: Build and push Fedora image
116122
uses: docker/build-push-action@v5
@@ -119,7 +125,7 @@ jobs:
119125
file: ./Dockerfile.ovn-kubernetes.fedora
120126
platforms: linux/amd64,linux/arm64
121127
push: ${{ github.event_name != 'pull_request' }}
122-
tags: ${{ steps.meta.outputs.tags }}
128+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_FEDORA }}:${{ steps.tag.outputs.tag }}
123129
labels: ${{ steps.meta.outputs.labels }}
124130
build-args: |
125131
OVN_KUBERNETES_DIR=ovn-kubernetes

.github/workflows/publish-helm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
4646
TAG=${GITHUB_REF#refs/tags/}
4747
else
48-
TAG=${GITHUB_SHA::7}
48+
TAG=v25.7.1-${GITHUB_SHA::7}
4949
fi
5050
echo "tag=${TAG}" >> $GITHUB_OUTPUT
5151

0 commit comments

Comments
 (0)