From e9b1ff7317b0d2082f230b33b7a740a990f014ea Mon Sep 17 00:00:00 2001 From: Om Mishra <32200996+mishraomp@users.noreply.github.com> Date: Mon, 14 Oct 2024 14:03:25 -0700 Subject: [PATCH] add tag as fallback for helm package when no PR --- .github/workflows/.deployer.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/.deployer.yml b/.github/workflows/.deployer.yml index 799a3a2..de06a5d 100644 --- a/.github/workflows/.deployer.yml +++ b/.github/workflows/.deployer.yml @@ -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}" @@ -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' @@ -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' @@ -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'