File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66name : hacktoberfest_prep
77
88on :
9+ push :
10+ paths :
11+ - ' .github/workflows/hacktoberfest_prep.yml'
12+ - ' scripts/hacktoberfest_prep_update.py'
13+ pull_request :
14+ paths :
15+ - ' .github/workflows/hacktoberfest_prep.yml'
16+ - ' scripts/hacktoberfest_prep_update.py'
917 schedule :
1018 - cron : " 50 11 * * *" # 11:50 UTC every day
1119 workflow_dispatch : # allow a manual run while testing
3745 set +e
3846 python scripts/hacktoberfest_prep_update.py
3947 echo "exit_code=$?" >> "$GITHUB_OUTPUT"
48+ # Dry run on push / pull_request: show the diff the script produced but
49+ # do NOT commit or push. This lets a PR prove the tracker still gathers
50+ # its data and rewrites docs/hacktober_2026_prep.md correctly without
51+ # leaving a permanent commit. Only the schedule/manual runs persist.
52+ - name : Show changes (dry run)
53+ if : github.event_name == 'push' || github.event_name == 'pull_request'
54+ run : |
55+ echo "Dry run (${{ github.event_name }}): showing git diff, not committing."
56+ git --no-pager diff -- docs/hacktober_2026_prep.md
57+ if git diff --quiet -- docs/hacktober_2026_prep.md; then
58+ echo "No changes to docs/hacktober_2026_prep.md."
59+ fi
4060 - name : Commit any changes
61+ if : github.event_name != 'push' && github.event_name != 'pull_request'
4162 run : |
4263 git config --global user.name "$GITHUB_ACTOR"
4364 git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
You can’t perform that action at this time.
0 commit comments