Skip to content

Commit

Permalink
🧹 make sure cnspec release works with versions containing 'v' (#874)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Oct 4, 2023
1 parent 9eed82c commit c7e0894
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/cnspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Sanitize version input
run: |
TAG=${{ github.event.inputs.version }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
Expand All @@ -49,8 +54,8 @@ jobs:
with:
images: ${{ env.IMAGE }}
tags: |
type=semver,pattern={{version}},value=${{ github.event.inputs.version }}
type=semver,pattern={{major}},value=${{ github.event.inputs.version }}
type=semver,pattern={{version}},value=${{ env.VERSION }}
type=semver,pattern={{major}},value=${{ env.VERSION }}
type=raw,value=latest
flavor: |
suffix=${{ matrix.suffix }},onlatest=true
Expand All @@ -61,7 +66,7 @@ jobs:
with:
context: .
file: cnspec.Dockerfile
build-args: VERSION=${{ github.event.inputs.version }}
build-args: VERSION=${{ env.VERSION }}
platforms: linux/amd64,linux/arm64,linux/arm
push: true
labels: ${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit c7e0894

Please sign in to comment.