#1f9a3 the goal
Active every day — without opening the laptop
The aim was simple to state and easy to get wrong: make the GitHub contribution graph show daily activity, without sitting down to code every single day. The constraint that matters is what makes it legitimate — every commit still has to contain a real change. Nothing manufactured just to paint a square green.
#7c2e0 how it works
GitHub Actions: a robot with a clock
GitHub Actions runs commands on GitHub’s own servers, on a timer — your machine never has to be on. Each workflow lives in .github/workflows/*.yml and is built from three pieces:
schedule: cronthe timer itself — minute, hour, day-of-month, month, weekday
workflow_dispatchadds a manual “run now” button, handy for testing without waiting for the clock
permissions: writegrants the job permission to push a commit back to the repo
#a021e the honesty check
No diff, no commit
This is the line that keeps the whole thing legitimate. Every workflow runs the same guard before it’s allowed to commit:
daily-content.yml— commit step
if git diff —cached —quiet; then
echo “No changes to commit.”
else
git commit -m “chore: refresh quote of the day ($(date -u +%F))”
git push
fi
git diff —cached —quiet asks one question: did anything actually change? If nothing did, the job prints a line and stops — no commit, no push, no square. The green squares that do appear are a side effect of real maintenance, not the point of it.
#5e63f whose contribution
Making the commit count as mine
Left alone, a workflow’s commit is authored by github-actions[bot] — which GitHub does not count on a profile. The fix is telling git who’s really “writing” the commit:
env— author identity
env:
GIT_AUTHOR_NAME: {{ secrets.DAILY_COMMIT_NAME }}
GIT_AUTHOR_EMAIL: {{ secrets.DAILY_COMMIT_EMAIL }}
secret values never appear in the workflow file itself — only their names
The email has to match a verified address on the GitHub account. That single match is what routes the commit into the profile’s graph instead of the bot’s.
#0d4a7 timing
Why the three clocks are offset
GitHub’s scheduler gets congested right at :00 and :30, so each job’s cron is nudged a few minutes past. The order is deliberate too — content first, so the sitemap’s “last modified” reflects that day’s real change, then the link check last.
#c99b2 glossary
Terms worth keeping
cron schedulea timer written as five numbers — minute, hour, day, month, weekday
secreta private value (name, email, token) stored in repo settings, never shown in the code
idempotent guardchecking “did anything change?” before acting, so nothing happens twice for no reason
author identitywho git credits for a commit — the thing that decides if it counts on the graph