Skip to content

Commit

Permalink
CI: fix auto build chart
Browse files Browse the repository at this point in the history
  • Loading branch information
cyclinder committed Oct 29, 2023
1 parent 607e80e commit e0d1862
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/call-release-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
description: 'tag, sha, branch'
required: true
default: v1.0.0
push:
description: 'push chart'
required: false
default: false

permissions: write-all

Expand All @@ -22,19 +26,19 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
steps:
- name: Get Original Ref
id: get_original_ref
run: |
if ${{ github.event_name == 'workflow_dispatch' }} ; then
echo "call by workflow_dispatch"
ver=${{ inputs.ref }}
echo "ref=${ver}" >> $GITHUB_OUTPUT
echo "ref=${{ inputs.ref }}" >> $GITHUB_OUTPUT
echo "push=${{ inputs.push }}" >> $GITHUB_OUTPUT
elif ${{ github.event_name == 'push' }} ; then
echo "call by push"
ver=${{ github.ref }}
echo "ref=${ver}" >> $GITHUB_OUTPUT
echo "push=true" >> $GITHUB_OUTPUT
else
echo "unexpected event: ${{ github.event_name }}"
exit 1
Expand Down Expand Up @@ -76,4 +80,4 @@ jobs:
--git-repo "$repo" \
--index-path index.yaml \
--release-name-template "{{ .Name }}-chart-{{ .Version }}" \
--push
--push ${{ steps.get_original_ref.outputs.push }}

0 comments on commit e0d1862

Please sign in to comment.