Skip to content

Commit

Permalink
add tag as fallback for helm package when no PR
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp authored Oct 14, 2024
1 parent b4289a5 commit e9b1ff7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/.deployer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
tag=${{ inputs.tag || steps.pr.outputs.pr }}
# Release name includes run numbers to ensure uniqueness
release=${{ github.event.repository.name }}-${{ inputs.environment || steps.pr.outputs.pr || inputs.tag }}
release=${{ github.event.repository.name }}-${{ inputs.environment || steps.pr.outputs.pr || inputs.tag }}
# Summary
echo "tag=${tag}"
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
run: |
# Helm package
sed -i 's/^name:.*/name: ${{ github.event.repository.name }}/' Chart.yaml
helm package -u . --app-version="tag-${{ steps.vars.outputs.tag }}_run-${{ github.run_number }}" --version=${{ steps.pr.outputs.pr }}
helm package -u . --app-version="tag-${{ steps.vars.outputs.tag }}_run-${{ github.run_number }}" --version=${{ steps.pr.outputs.pr || inputs.tag }}
# Deploy Helm chart as atomic, with timeout
- if: steps.triggers.outputs.triggered == 'true' && inputs.atomic != 'false'
Expand All @@ -155,7 +155,7 @@ jobs:
--install --wait --atomic ${{ steps.vars.outputs.release }} \
--timeout ${{ inputs.timeout-minutes }}m \
--values ${{ inputs.values }} \
./${{ github.event.repository.name }}-${{ steps.pr.outputs.pr }}.tgz
./${{ github.event.repository.name }}-${{ steps.pr.outputs.pr || inputs.tag }}.tgz
# Deploy Helm chart without atomic or timeout
- if: steps.triggers.outputs.triggered == 'true' && inputs.atomic == 'false'
Expand All @@ -168,7 +168,7 @@ jobs:
${{ inputs.params }} \
${{ steps.vars.outputs.release }} \
--install --wait --values ${{ inputs.values }} \
./${{ github.event.repository.name }}-${{ steps.pr.outputs.pr }}.tgz
./${{ github.event.repository.name }}-${{ steps.pr.outputs.pr || inputs.tag }}.tgz
# Helm release history
- if: steps.triggers.outputs.triggered == 'true'
Expand Down

0 comments on commit e9b1ff7

Please sign in to comment.