Fix GitHub Actions failures by updating checkout versions and fixing i18n workflow bug
This PR resolves the GitHub Actions failures that were affecting all PRs, regardless of their content. The issue was caused by outdated action versions and a bug in the i18n consistency check workflow.
Problems Fixed
1. Outdated actions/checkout versions
Multiple workflows were using deprecated versions of actions/checkout (v2 and v3) which have known security vulnerabilities and compatibility issues with newer GitHub runners:
main.ymlwas usingactions/checkout@v2learning-path.ymlwas usingactions/checkout@v2i18n-consistency-check.ymlwas usingactions/checkout@v2links-fail-fast.ymlwas usingactions/checkout@v3
2. Undefined variable in i18n workflow
The i18n-consistency-check.yml workflow referenced an undefined variable $i18n_last_update_hash on line 70, causing runtime failures when the workflow attempted to generate GitHub issue links.
3. Missing build artifact handling
The .gitignore file wasn't configured to handle temporary build files that could be accidentally committed during development or CI runs.
Changes Made
- Updated all workflows to use
actions/checkout@v4for consistency, security, and compatibility - Fixed the undefined variable bug by adding the missing line to capture the translated file's commit hash:
i18n_last_update_hash=$(git log -1 --format=%H $i18n_filename) - Enhanced
.gitignoreto prevent accidental commits of build artifacts like*.deband*.tar.gzfiles
Testing
- ✅ Hugo builds successfully with all language variants
- ✅ i18n file generation process works correctly
- ✅ All workflow syntax is valid
- ✅ No existing functionality was broken
These minimal changes should resolve the GitHub Actions failures that were preventing PRs from passing their required checks.
Original prompt
This section details on the original issue you should resolve
<issue_title>GitHub actions should pass</issue_title> <issue_description>Describe the bug Every PR is getting GitHub action failures (nothing to do with PR contents)
Expected behavior Empty PR should have all action successes.
Additional context If the checks are finding something legitimate then fix whatever they are finding. If there checks don’t make sense then change the checks. </issue_description>
Comments on the Issue (you are @copilot in this section)
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Why so many files changed? Can you break this up!