Skip to content

Commit a226ee2

Browse files
committed
fix(automations): feed request should not fail when empty
1 parent 003e46c commit a226ee2

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/automatic-feed-request.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,24 @@ jobs:
2828
- name: Install dependencies
2929
run: uv sync
3030
- name: Check for new feeds
31-
run: uv run check_new_feed.py
3231
id: feed
32+
run: |
33+
uv run check_new_feed.py
34+
status=$?
35+
if [ "$status" -eq 78 ]; then
36+
echo "No update needed (exit code 78)."
37+
echo "should_create_issue=false" >> $GITHUB_OUTPUT
38+
exit 0
39+
elif [ "$status" -eq 0 ]; then
40+
echo "should_create_issue=true" >> $GITHUB_OUTPUT
41+
exit 0
42+
else
43+
echo "Script failed with exit code $status"
44+
exit $status
45+
fi
3346
- name: Create issue
3447
uses: JasonEtco/create-an-issue@v2
35-
if: steps.feed.outcome == 'success' && steps.feed.conclusion != 'neutral'
48+
if: steps.feed.outputs.should_create_issue == 'true'
3649
env:
3750
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3851
with:

0 commit comments

Comments
 (0)