RFR: 8315873: [GHA] Update checkout and cache action to use v4
Ambarish Rapte
arapte at openjdk.org
Thu Jan 2 13:19:55 UTC 2025
In GHA, the two actions `checkout` and `cache` need to be updated to version 4.
**Checkout action**
- The Node is updated to version 20.
- We do not explicitly specify node version
- But we use the action checkout, which should be updated to latest version as advised.
- With checkout at v4, GHA would use node 20.
- Although, apart from warning we may not see any real issue, as we don’t use node and don’t specify any version.
- End of life for Actions Node16 : https://github.blog/changelog/2024-09-25-end-of-life-for-actions-node16/
- GitHub Actions: Transitioning from Node 16 to Node 20: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
- Updated dates for Actions runner using Node20 instead of Node16 by default: https://github.blog/changelog/2024-05-17-updated-dates-for-actions-runner-using-node20-instead-of-node16-by-default/
- Action checkout version 4.00 Release note: https://github.com/actions/checkout/releases/tag/v4.0.0
**Cache action**
- Currently we use action cache version 2, for Windows build
- Cache v1-v2 will be deprecated starting February 1st, 2025
- Our workflow will start to fail on windows, starting Feb 1st, 2025
- Refer: Notice of upcoming deprecations and changes in GitHub Actions services: https://github.blog/changelog/2024-09-16-notice-of-upcoming-deprecations-and-changes-in-github-actions-services/
- Refer: Important changes under What’s new : https://github.com/actions/cache
Verification:
1. The build should complete successfully on all platforms.
2. **cache action**: In GitHub actions, it showed a warning related to `cache` action: See the Windows x64 related warning on any recent build under actions tab : https://github.com/arapte/jfx/actions/runs/12428608806
**Warning message:**
`Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache at v2. Please update your workflow to use the latest version of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-09-16-notice-of-upcoming-deprecations-and-changes-in-github-actions-services/`
This warning disappears with this change: https://github.com/arapte/jfx/actions/runs/12581903371
3. **checkout action**: no specific check point.
-------------
Commit messages:
- gha actions/cache v4 - commented
- gha actions/cache v4
- gha checkout v4
Changes: https://git.openjdk.org/jfx/pull/1669/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1669&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8315873
Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod
Patch: https://git.openjdk.org/jfx/pull/1669.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1669/head:pull/1669
PR: https://git.openjdk.org/jfx/pull/1669
More information about the openjfx-dev
mailing list