Skip to content

Commit

Permalink
ci: fix workflow dispath have no correct tag
Browse files Browse the repository at this point in the history
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z committed Sep 25, 2024
1 parent 49a5ba9 commit 82bcd5e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ on:
required: true
default: HEAD

env:
GIT_TAG: ${{ github.event_name == 'push' && github.ref || inputs.tag }}

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'push' && github.ref || inputs.tag }}
ref: ${{ env.GIT_TAG }}
- name: Check helm
if: github.event_name == 'push'
run: |
Expand Down Expand Up @@ -56,8 +59,8 @@ jobs:
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}},value=${{ env.GIT_TAG }}
type=semver,pattern={{major}}.{{minor}},value=${{ env.GIT_TAG }}
- uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
Expand All @@ -81,6 +84,7 @@ jobs:
fi
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.GIT_TAG }}
prerelease: ${{ steps.prerelease.outputs.prerelease }}
generate_release_notes: true
## When you use the repository's GITHUB_TOKEN to perform tasks,
Expand Down

0 comments on commit 82bcd5e

Please sign in to comment.