From 1a7ab54819df14b75261e840282703c78ba13a89 Mon Sep 17 00:00:00 2001 From: Henry Whitaker Date: Sat, 20 Apr 2024 19:42:15 +0100 Subject: [PATCH] ci: don't fail the workflow if it already exists --- .github/workflows/chart.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chart.yaml b/.github/workflows/chart.yaml index 4ebb731..dc0bc9d 100644 --- a/.github/workflows/chart.yaml +++ b/.github/workflows/chart.yaml @@ -31,10 +31,19 @@ jobs: - name: Check if chart exists id: chartExists - run: docker manifest inspect ghcr.io/henrywhitaker3/prompage-helm:${{ env.CHART_VERSION }} + run: | + set +e + docker manifest inspect ghcr.io/henrywhitaker3/prompage-helm:${{ env.CHART_VERSION }} + rc=$? + set -e + if [ $rc -eq 0 ]; then + echo "::set-output name=CHART_EXISTS::'yes'" + else + echo "::set-output name=CHART_EXISTS::'no'" + fi - name: Push chart - if: failure() && steps.chartExists.outcome == 'failure' + if: steps.chartExists.outputs.CHART_EXISTS == 'no' uses: appany/helm-oci-chart-releaser@v0.4.1 with: name: prompage-helm