Skip to content

Commit aaa20f0

Browse files
committed
Skip commit step in kobo GitHub Action if not needed
1 parent 88b5eba commit aaa20f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: .github/workflows/cron-wishlist.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@ jobs:
3636

3737
- name: Fetch Kobo wishlist data
3838
id: fetch
39-
continue-on-error: true
4039
run: |
4140
output=$(deno run --allow-net --allow-read --allow-env ./script/fetch-kobo-wishlist.ts)
42-
ec=$?
43-
echo "exit_code=$ec" >> $GITHUB_OUTPUT
4441
echo "output<<EOF" >> $GITHUB_OUTPUT
4542
echo "$output" >> $GITHUB_OUTPUT
4643
echo "EOF" >> $GITHUB_OUTPUT
@@ -54,11 +51,14 @@ jobs:
5451
if [[ -n "${{ steps.fetch.outputs.output }}" ]]; then
5552
echo "${{ steps.fetch.outputs.output }}" >> "${{ env.READING_LIST_PATH }}"
5653
echo "Successfully updated reading list"
54+
echo "changes_made=true" >> $GITHUB_OUTPUT
5755
else
5856
echo "No new items to add. Output: ${{ steps.fetch.outputs.output }}"
57+
echo "changes_made=false" >> $GITHUB_OUTPUT
5958
fi
6059
6160
- name: Commit and push changed files
61+
if: steps.process.outputs.changes_made == 'true'
6262
# Pull first, since something could've been pushed in-between.
6363
run: |
6464
git pull

0 commit comments

Comments
 (0)