[WIP] Review GitHub folder and workflows for best practices#1
Conversation
- Fix critical indentation error in update-cv.yml - Add concurrency control to both workflows - Add timeout limits to prevent hanging jobs - Add ORCID_TOKEN validation before use - Add comprehensive documentation in .github/README.md - Document 60-day workflow disable policy and solutions Co-authored-by: oddish3 <122614236+oddish3@users.noreply.github.com>
- Fix timing recommendation to 50 days with proper safety margin - Use generic placeholder for repository path in example - Clarify 7 weeks calculation accuracy Co-authored-by: oddish3 <122614236+oddish3@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Improves the repository’s GitHub Actions setup by hardening the existing CV update and Quarto publish workflows and adding documentation to explain usage and operational caveats (notably scheduled workflow auto-disable).
Changes:
- Added concurrency controls and job timeouts to both workflows.
- Added an
ORCID_TOKENpreflight validation step to the CV update workflow and fixed YAML indentation in its commit/push step. - Added
.github/README.mddocumenting workflow behavior, requirements, and troubleshooting.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/update-cv.yml | Adds concurrency/timeout/secret validation and fixes indentation in the commit/push script. |
| .github/workflows/quarto-publish.yml | Adds concurrency control and a job timeout to reduce overlapping/hanging deploys. |
| .github/README.md | Documents the workflows, required secrets, and notes about scheduled workflow disabling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if git diff --quiet -- cv/resume.pdf cv/resume.typ research/index.qmd 2>/dev/null; then | ||
| echo "No changes to CV, skipping commit" | ||
| exit 0 | ||
| fi | ||
| git pull --rebase origin main | ||
| git add cv/resume.pdf cv/resume.typ research/index.qmd | ||
| git commit -m "Automated CV update [skip ci]" |
There was a problem hiding this comment.
git pull --rebase origin main is executed after the workflow has potentially modified tracked files (the diff check happens after running the update + compile steps). If there are changes to commit (the common case), the working tree is dirty and git pull --rebase will fail with “cannot pull with rebase: You have unstaged changes”. Move the pull/rebase (or git fetch + git reset --hard origin/main) to immediately after checkout, before generating files, or enable autostash explicitly (e.g., git pull --rebase --autostash).
| 4. Select the branch (usually `main`) | ||
| 5. Click "**Run workflow**" button | ||
|
|
There was a problem hiding this comment.
The README says manual workflow execution involves selecting a branch (usually main), but update-cv.yml hard-codes actions/checkout to ref: main and always pushes to main. Either update the documentation to say the branch selection is ignored for this workflow, or update the workflow to use the dispatch-selected ref (and avoid pushing to main when run on other branches).
| 4. Select the branch (usually `main`) | |
| 5. Click "**Run workflow**" button | |
| 4. For workflows that support it (e.g., Quarto Publish), select the branch (usually `main`) | |
| 5. Click "**Run workflow**" button | |
| **Note**: The Monthly CV Update workflow (`update-cv.yml`) always runs against the `main` branch, regardless of the branch selected in the UI. |
Critical Review of .github Workflows - COMPLETE
Issues Fixed:
Best Practices Implemented:
update-cv.yml:
cv-updategroup, no cancellation)quarto-publish.yml:
pages-deploygroup, no cancellation)About the 60-Day Disable Warning
The Issue: GitHub automatically disables scheduled workflows after 60 days of no repository activity to save resources.
Solutions Provided:
workflow_dispatch trigger (already present, documented)
Documentation in .github/README.md covers:
Best practice: Run workflow manually every ~50 days if no commits occur
Why not a keep-alive workflow?
Testing & Quality
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.