Skip to content

Upgrade actions/checkout to v5 and setup-java#348

Open
karangattu wants to merge 11 commits into
mainfrom
upgrade-github-actions
Open

Upgrade actions/checkout to v5 and setup-java#348
karangattu wants to merge 11 commits into
mainfrom
upgrade-github-actions

Conversation

@karangattu
Copy link
Copy Markdown
Contributor

Bump GitHub Actions versions across workflows: update actions/checkout from v4 to v5 in multiple workflow files and update actions/setup-java from v3 to v5 in apps-test-os.yml. This keeps CI workflows current with upstream action releases and their improvements.

Files modified: .github/workflows/apps-deploy.yml, apps-deps.yml, apps-docker.yml, apps-test-os.yml, apps-test-precheck.yml, build-results.yml, install-debug.yaml, trim-old-branches.yml.

Bump GitHub Actions versions across workflows: update actions/checkout from v4 to v5 in multiple workflow files and update actions/setup-java from v3 to v5 in apps-test-os.yml. This keeps CI workflows current with upstream action releases and their improvements.

Files modified: .github/workflows/apps-deploy.yml, apps-deps.yml, apps-docker.yml, apps-test-os.yml, apps-test-precheck.yml, build-results.yml, install-debug.yaml, trim-old-branches.yml.
Upgrade GitHub Actions usages: actions/checkout bumped to v5 across workflows and actions/setup-java bumped to v5. Replace the Ana06/get-changed-files action with a new local helper inst/gha/get-changed-files.py and update workflows to invoke it (using GITHUB_TOKEN and writing to GITHUB_OUTPUT). The Python helper pages through the GitHub API to collect changed filenames for pull requests and emits a JSON array to the workflow output.
Add a temporary env FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true (with explanatory comment) to multiple GitHub Actions workflow files as a workaround for Node 20 deprecation until r-lib/actions ships a newer runtime. Changes applied to: .github/workflows/R-CMD-check.yaml, apps-config.yml, apps-deploy.yml, apps-deps.yml, apps-test-os.yml, build-results.yml, and install-debug.yaml.
Restrict the workflow branch to only include generated app artifacts so pushes don't require workflow-writing permissions when the tested branch changes CI. Collect commit SHAs for artifact commits (sysinfo and inst/apps), exit early if none, fetch the repo default branch and create the gha branch from origin/<default>, then cherry-pick only the artifact commits before force-pushing. Also preserve and restore the original working ref after the push.
Regenerate test snapshots for inst/apps/131-renderplot-args/tests/testthat/_snaps/windows-4.4/mytest: the PNG binary was updated and the image data hash in 001.json was changed to match the new rendered plot.
Comment thread .github/workflows/apps-config.yml
Comment thread .github/workflows/apps-deploy.yml
Comment thread .github/workflows/apps-deps.yml
Comment thread .github/workflows/apps-test-os.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates GitHub Actions workflows to use newer upstream action versions and adjusts CI plumbing to keep workflows functioning as the Actions runtime changes.

Changes:

  • Bump actions/checkout from v4 to v5 across multiple workflows and bump actions/setup-java from v3 to v5 in apps-test-os.yml.
  • Replace Ana06/get-changed-files with a repo-local Python helper (inst/gha/get-changed-files.py) and wire it into the precheck + app test workflows.
  • Add a temporary FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 env workaround in several workflows; update a Windows snapshot artifact.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
inst/gha/get-changed-files.py New helper to query GitHub’s PR files API and emit all=<json> to GITHUB_OUTPUT.
inst/apps/131-renderplot-args/tests/testthat/_snaps/windows-4.4/mytest/001.json Snapshot hash updated to match new rendered output.
inst/apps/131-renderplot-args/tests/testthat/_snaps/windows-4.4/mytest/002.png New/updated Windows snapshot image.
.github/workflows/apps-test-precheck.yml Switch changed-files collection from a third-party action to the new Python helper; bump checkout to v5.
.github/workflows/apps-test-os.yml Bump checkout + setup-java; switch changed-files collection to Python helper; adjust gha- branch artifact push logic; add Node runtime env workaround.
.github/workflows/apps-deploy.yml Add Node runtime env workaround; bump checkout to v5.
.github/workflows/apps-deps.yml Add Node runtime env workaround; bump checkout to v5.
.github/workflows/apps-docker.yml Bump checkout to v5.
.github/workflows/build-results.yml Add Node runtime env workaround; bump checkout to v5.
.github/workflows/install-debug.yaml Add Node runtime env workaround; bump checkout to v5.
.github/workflows/trim-old-branches.yml Bump checkout to v5.
.github/workflows/apps-config.yml Add Node runtime env workaround.
.github/workflows/R-CMD-check.yaml Add Node runtime env workaround.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread inst/gha/get-changed-files.py Outdated
Comment thread inst/gha/get-changed-files.py
Comment thread .github/workflows/apps-test-os.yml
Comment thread .github/workflows/apps-test-os.yml Outdated
Comment thread .github/workflows/apps-test-precheck.yml Outdated
Comment thread .github/workflows/build-results.yml
Comment thread .github/workflows/install-debug.yaml
Comment thread .github/workflows/R-CMD-check.yaml
schloerke and others added 2 commits April 16, 2026 13:35
Co-authored-by: Barret Schloerke <barret@posit.co>
…d-files.py

Add a 30-second timeout to urlopen() and catch HTTPError/URLError to
provide clear diagnostics on CI failures instead of hanging or showing
opaque tracebacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread .github/workflows/apps-test-precheck.yml
Comment thread .github/workflows/apps-test-os.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants