diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfa5e3ac6..3a0039b21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,13 +71,15 @@ jobs: run: | if ! git ls-tree -r ${{ steps.latest_tag.outputs.tag }} -- ./pakku-lock.json &> /dev/null; then echo "❌ File pakku-lock.json not found in previous tag" + echo "::set-output name=file_found::false" else echo "✔️ File pakku-lock.json found in previous tag" + echo "::set-output name=file_found::true" fi - name: 📁 Copy pakku-lock.json from previous tag id: copy_pakku_lock_prev - if: steps.check_pakku_lock_prev.conclusion == 'success' + if: steps.check_pakku_lock_prev.outputs.file_found == 'true' shell: bash run: | git show tags/${{ steps.latest_tag.outputs.tag }}:./pakku-lock.json > ./pakku-lock-prev.json @@ -89,7 +91,7 @@ jobs: - name: 📦 Download pakku.jar id: download_pakku - if: steps.check_pakku_lock_prev.conclusion == 'success' + if: steps.check_pakku_lock_prev.outputs.file_found == 'true' shell: bash run: | curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J @@ -97,7 +99,7 @@ jobs: - name: 🔄 Run pakku diff id: pakku_diff - if: steps.check_pakku_lock_prev.conclusion == 'success' + if: steps.check_pakku_lock_prev.outputs.file_found == 'true' shell: bash run: | java -jar pakku.jar diff -v --markdown PROJECTS_DIFF.md ./pakku-lock-prev.json ./pakku-lock.json @@ -109,7 +111,7 @@ jobs: - name: 📝 Read PROJECTS_DIFF.md to variable id: read_diff - if: steps.check_pakku_lock_prev.conclusion == 'success' + if: steps.check_pakku_lock_prev.outputs.file_found == 'true' shell: bash run: | echo "📝 Reading PROJECTS_DIFF.md to variable..." @@ -149,7 +151,7 @@ jobs: - name: 📈 Upload Diff id: upload_diff - if: ${{ steps.read_diff.outputs.diff != '' }} && steps.check_pakku_lock_prev.conclusion == 'success' + if: ${{ steps.read_diff.outputs.diff != '' }} && steps.check_pakku_lock_prev.outputs.file_found == 'true' uses: actions/upload-artifact@v4.5.0 with: name: Mods-diff