Skip to content

Commit 2d54558

Browse files
committed
actually need to test no diff detected case
1 parent 1bbfdcf commit 2d54558

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/weekly-api-diff.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Weekly API Diff
22

33
on:
4+
push:
5+
branches: [tsdiff_script] # temporary: remove before merging to main
46
schedule:
57
- cron: '0 17 * * 1' # Monday 9am PST / 10am PDT (GH Actions cron is UTC)
68
workflow_dispatch: # manual trigger for testing
@@ -56,18 +58,20 @@ jobs:
5658
echo "(first run — no previous diff to compare against)" > /tmp/weekly-delta.txt
5759
fi
5860
59-
cd snapshots
60-
git config user.email "github-actions@github.com"
61-
git config user.name "GitHub Actions"
62-
git add diffs/$TODAY.txt
63-
git commit -m "weekly api diff $TODAY"
64-
git push
61+
if [ -s /tmp/diff-current.txt ]; then
62+
cd snapshots
63+
git config user.email "github-actions@github.com"
64+
git config user.name "GitHub Actions"
65+
git add diffs/$TODAY.txt
66+
git commit -m "weekly api diff $TODAY"
67+
git push
68+
fi
6569
6670
# Summarize with GitHub Models (free via GITHUB_TOKEN) and post to Slack
6771
- name: Summarize and post to Slack
6872
env:
6973
SLACK_TSDIFF_CHROMATIC_BOT_TOKEN: ${{ secrets.SLACK_TSDIFF_CHROMATIC_BOT_TOKEN }}
70-
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
74+
SLACK_CHANNEL_ID: ${{ secrets.TEST_SLACK_ID }}
7175
GITHUB_TOKEN: ${{ github.token }}
7276
run: |
7377
python3 << 'PYEOF'

0 commit comments

Comments
 (0)