Skip to content

Commit 0eedf7f

Browse files
committed
extract v from version
1 parent 6335e08 commit 0eedf7f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/ci-golang.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,18 +229,23 @@ jobs:
229229
- name: Set up Docker Buildx
230230
uses: docker/setup-buildx-action@v3
231231

232+
- name: Strip "v" from version and set as output
233+
id: strip_v
234+
run: |
235+
version="${{ needs.extract-major-version.outputs.major_version }}"
236+
clean_version="${version#v}"
237+
echo "major_version=$clean_version" >> "$GITHUB_OUTPUT"
238+
232239
- name: Docker meta
233-
env:
234-
MAJOR_VERSION: ${{ needs.extract-major-version.outputs.major_version | sed 's/^v//'}}
235240
uses: docker/metadata-action@v5
236241
id: meta
237242
with:
238243
images: |
239244
ghcr.io/gdatasoftwareag/vaas/git-scan
240245
tags: |
241-
type=semver,pattern={{version}},value=${{ env.MAJOR_VERSION }}
242-
type=semver,pattern={{major}}.{{minor}},value=${{ env.MAJOR_VERSION }}
243-
type=semver,pattern={{major}},value=${{ env.MAJOR_VERSION }}
246+
type=semver,pattern={{version}},value=${{ steps.strip_v.outputs.major_version }}
247+
type=semver,pattern={{major}}.{{minor}},value=${{ steps.strip_v.outputs.major_version }}
248+
type=semver,pattern={{major}},value=${{ steps.strip_v.outputs.major_version }}
244249
flavor: |
245250
latest=auto
246251

0 commit comments

Comments
 (0)