Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/calendar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
pull_request:

jobs:
update-tournaments:
Expand All @@ -30,8 +31,29 @@ jobs:
run: |
python _scripts/update_tournaments.py

- name: Add tournaments diff to summary (pull requests only)
if: github.event_name == 'pull_request'
run: |
diff_output=$(git diff -- _data/tournaments.tsv)
if [ -z "$diff_output" ]; then
{
echo "## Tournament list diff"
echo
echo "No changes in \\`_data/tournaments.tsv\\`."
} >> "$GITHUB_STEP_SUMMARY"
else
{
echo "## Tournament list diff"
echo
echo '```diff'
echo "$diff_output"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
fi

# Commit all changed files back to the repository
- uses: stefanzweifel/git-auto-commit-action@v7
if: github.event_name != 'pull_request'
with:
commit_message: Update tournaments
file_pattern: '*.tsv'
Loading