diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index a2fda26..e489499 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -67,10 +67,10 @@ jobs: - name: Update values run: | - if [ "${{ inputs.update-helm }}" = "true" ]; then + if [ "${{ inputs.update-helm }}" = "true" ] && [ -n "${{ inputs.helm-version }}" ] && [ -n "${{ inputs.helm-path }}" ]; then yq e '${{ inputs.helm-path }} = "${{ inputs.helm-version }}"' -i "${{ inputs.file-path }}" fi - if [ "${{ inputs.update-image }}" = "true" ]; then + if [ "${{ inputs.update-image }}" = "true" ] && [ -n "${{ inputs.image-version }}" ] && [ -n "${{ inputs.image-path }}" ]; then yq e '${{ inputs.image-path }} = "${{ inputs.image-version }}"' -i "${{ inputs.file-path }}" fi diff --git a/.gitea/workflows/homelab-deploy.yaml b/.gitea/workflows/homelab-deploy.yaml index edd5af5..771bcb7 100644 --- a/.gitea/workflows/homelab-deploy.yaml +++ b/.gitea/workflows/homelab-deploy.yaml @@ -46,10 +46,10 @@ jobs: uses: https://gitea.ldpt.fr/actions/argocd-deploy/.gitea/workflows/deploy.yaml@main with: server-url: https://github.com - argocd-repo: lucasdpt/k8s-homelab-gitops + argocd-repo: lucasdpt/k8s-homelab file-path: ${{ inputs.file-path }} - update-helm: ${{ inputs.update-helm }} - update-image: ${{ inputs.update-image }} + update-helm: ${{ inputs.update-helm == true }} + update-image: ${{ inputs.update-image == true }} helm-path: ${{ inputs.helm-path }} helm-version: ${{ inputs.helm-version }} image-path: ${{ inputs.image-path }}