Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Xikaro committed Dec 21, 2024
1 parent a29a19e commit 33f8b13
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -89,15 +91,15 @@ 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
echo "✔️ Downloaded pakku.jar "
- 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
Expand All @@ -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..."
Expand Down Expand Up @@ -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/[email protected]
with:
name: Mods-diff
Expand Down

0 comments on commit 33f8b13

Please sign in to comment.