From 86dd1823d029a2872faaa97630035cc470fe9f01 Mon Sep 17 00:00:00 2001 From: Remko Popma Date: Fri, 24 Mar 2023 13:39:37 +0900 Subject: [PATCH] [CI/CD] prevent Error reading JToken from JsonReader. Path '', line 0, position 0. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c020cebc6..362f217b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: shell: bash if: ${{ always() && matrix.os == 'ubuntu-latest' }} run: | - case ${{ fromJSON( steps.test-results-nix.outputs.json ).conclusion }} in + case ${{ steps.test-results-nix.outputs.json && fromJSON( steps.test-results-nix.outputs.json ).conclusion }} in success) echo "BADGE_COLOR=31c653" >> $GITHUB_ENV ;; @@ -79,7 +79,7 @@ jobs: shell: bash if: ${{ always() && (matrix.os == 'macos-latest' || matrix.os == 'windows-latest') }} run: | - case ${{ fromJSON( steps.test-results.outputs.json ).conclusion }} in + case ${{ steps.test-results.outputs.json && fromJSON( steps.test-results.outputs.json ).conclusion }} in success) echo "BADGE_COLOR=31c653" >> $GITHUB_ENV ;; @@ -92,7 +92,7 @@ jobs: esac - name: Create badge (Linux) - if: ${{ always() && matrix.os == 'ubuntu-latest' }} + if: ${{ always() && matrix.os == 'ubuntu-latest' && steps.test-results-nix.outputs.json }} uses: emibcn/badge-action@4209421db54c8764d8932070ffd0f81715a629bf with: label: Tests @@ -101,7 +101,7 @@ jobs: path: badge.svg - name: Create badge (Win/Mac) - if: ${{ always() && (matrix.os == 'macos-latest' || matrix.os == 'windows-latest') }} + if: ${{ always() && (matrix.os == 'macos-latest' || matrix.os == 'windows-latest') && test-results.outputs.json }} uses: emibcn/badge-action@4209421db54c8764d8932070ffd0f81715a629bf with: label: Tests