File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Weekly API Diff
22
33on :
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'
You can’t perform that action at this time.
0 commit comments