Skip to content

ci: upgrade deprecated GitHub Actions before Node.js 24 deadline (June 2nd)#160

Open
TimeToBuildBob wants to merge 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:bob/ci-node20-action-upgrades
Open

ci: upgrade deprecated GitHub Actions before Node.js 24 deadline (June 2nd)#160
TimeToBuildBob wants to merge 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:bob/ci-node20-action-upgrades

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Problem

GitHub Actions will force Node.js 24 by default starting June 2nd, 2026 (10 days away). The following actions in build.yml use Node.js 20 and will break:

Action Old New
actions/checkout v2 / v3 v4
actions/cache v3 v4
actions/cache/restore v3 v4
actions/setup-java v1 v4 + distribution: temurin
android-actions/setup-android v2 v3
actions/upload-artifact v3 v4
actions/download-artifact v3 v4
Wandalen/wretry.action @master @v3.8.0_js_action (pinned)

Notes

  • actions/setup-java@v2+ requires a distribution parameter — added temurin (Eclipse Temurin, the standard OpenJDK distribution used by GH-hosted runners)
  • ruby/setup-ruby, adnsio/setup-age-action, custom ActivityWatch/check-version-format-action are unchanged (not affected by the Node.js 20 deprecation)
  • Wandalen/wretry.action@master was pinned to v3.8.0_js_action (the already-deployed version) for reproducibility

@greptile-apps

greptile-apps Bot commented May 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR upgrades all deprecated GitHub Actions in build.yml to Node.js 24-compatible versions ahead of GitHub's June 2026 enforcement deadline, resolving the upload-artifact@v4 name-collision issue, and adding fork-PR guards so secret-dependent steps are safely skipped.

  • All eight affected actions (checkout, cache, cache/restore, setup-java, setup-android, upload-artifact, download-artifact, wretry.action) are upgraded to their current major versions; setup-java@v4 gains the required distribution: temurin parameter.
  • The build-apk matrix now uploads distinct artifacts (aw-android-apk / aw-android-aab), and both release jobs download them with pattern: aw-android-* + merge-multiple: true to restore the combined-artifact behaviour.
  • A separate (but bundled) change pins dtolnay/rust-toolchain to 1.79.0 and refactors the test-e2e emulator setup away from the deprecated $ANDROID_HOME/tools/ path, replacing it with a portable find_android_tool helper.

Confidence Score: 5/5

Safe to merge — all action upgrades are correct, artifact naming is fixed for v4 semantics, and the fork-PR guards are well-implemented.

All action upgrades are correct with well-understood migration requirements. The upload-artifact v4 name-collision was already resolved, setup-java v4 distribution parameter is correctly added, and the wretry.action pin improves reproducibility. The Rust 1.79.0 pin is clearly justified in comments. No correctness issues were found.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/build.yml All deprecated actions upgraded correctly; artifact naming fixed for v4; fork-PR guards added; minor double setup-android@v3 invocation in test-e2e; Rust pinned to 1.79.0 as a bundled fix.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([trigger]) --> BR[build-rust]
    A --> GV[get-versionCode]
    GV --> ForkCheck{fork PR?}
    ForkCheck -->|yes| VCFallback[read from build.gradle]
    ForkCheck -->|no| Fastlane[wretry fastlane update_version]
    Fastlane --> VCFallback
    BR --> T[test]
    BR --> TE[test-e2e]
    BR --> BuildApk{fork PR?}
    GV --> BuildApk
    BuildApk -->|yes| SKIP([skipped])
    BuildApk -->|no| APK[build-apk matrix apk + aab]
    APK --> Art1[(aw-android-apk)]
    APK --> Art2[(aw-android-aab)]
    Art1 --> RF[release-fastlane]
    Art2 --> RF
    Art1 --> RG[release-gh]
    Art2 --> RG
    T --> RF
    T --> RG
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A([trigger]) --> BR[build-rust]
    A --> GV[get-versionCode]
    GV --> ForkCheck{fork PR?}
    ForkCheck -->|yes| VCFallback[read from build.gradle]
    ForkCheck -->|no| Fastlane[wretry fastlane update_version]
    Fastlane --> VCFallback
    BR --> T[test]
    BR --> TE[test-e2e]
    BR --> BuildApk{fork PR?}
    GV --> BuildApk
    BuildApk -->|yes| SKIP([skipped])
    BuildApk -->|no| APK[build-apk matrix apk + aab]
    APK --> Art1[(aw-android-apk)]
    APK --> Art2[(aw-android-aab)]
    Art1 --> RF[release-fastlane]
    Art2 --> RF
    Art1 --> RG[release-gh]
    Art2 --> RG
    T --> RF
    T --> RG
Loading

Reviews (5): Last reviewed commit: "fix(ci): use ubicloud runner for test jo..." | Re-trigger Greptile

Comment thread .github/workflows/build.yml
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Addressed the Greptile review findings:

Artifact name collision (upload-artifact@v4 breaking change): The matrix build-apk jobs were both uploading to name: aw-android. With v3 this silently merged; v4 rejects concurrent uploads to the same name. Fixed by:

  • Upload: name: aw-android-${{ matrix.type }} (produces aw-android-apk and aw-android-aab)
  • Download in release jobs: pattern: aw-android-* + merge-multiple: true (merges both into dist/ as before)

Unused NODE_VERSION: '16': Removed — it was never referenced in the workflow and Node 16 is EOL.


The two CI failures (Get latest versionCode and Build aw-server-rust) are pre-existing issues unrelated to this PR:

  • Get latest versionCode: fails because KEY_FASTLANE_API secret is empty on PR branches (expected — secrets aren't available here)
  • Build aw-server-rust: fails with a Rust type inference error in the time-0.3.30 crate (pre-existing; master CI also fails this job)

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Follow-up after comparing this branch against #158 and the other open fork PRs: these failures were branch-specific, not ambient repo breakage.

Pushed 7198ce6 to bob/ci-node20-action-upgrades:

  • gate Ruby/age/fastlane update_version and build-apk behind the same-repo PR check so fork PRs stop failing on missing secrets and use the committed build.gradle versionCode as fallback
  • pin Rust to 1.79.0 for aw-server-rust@dc70318, which avoids the time crate E0282 failure on newer toolchains
  • bootstrap emulator tool discovery for the setup-android@v3 path changes so test-e2e can find sdkmanager, avdmanager, emulator, and adb

The earlier artifact-name/download fix is still in place. GitHub Actions has already started a fresh Build run on this commit.

@TimeToBuildBob TimeToBuildBob force-pushed the bob/ci-node20-action-upgrades branch from 7198ce6 to 380851e Compare May 22, 2026 14:08
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Added commit 380851e to bump the Test job runner from retired ubuntu-20.04 to ubuntu-22.04. This was the intermittent "waiting for a runner to pick up this job" stall Erik flagged on #156 — GitHub retired the ubuntu-20.04 image so that job sat forever. Also rebased onto latest master (was 1 commit behind).

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

@greptileai review

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Fixed the Test CI job failure: the test job was running on ubuntu-22.04 (GitHub-hosted) while build-rust runs on ubicloud-standard-8. These runner types don't share the GitHub Actions cache, so fail-on-cache-miss: true on the jniLibs restore tripped every time. Changed the test job to ubicloud-standard-4 (same runner family, cheaper tier) to fix cache sharing — commit 9c585b3.

Also triggered a fresh Greptile review — the P1 artifact name-collision finding in the prior review was already addressed in the current code (name: aw-android-${{ matrix.type }} + pattern: aw-android-* with merge-multiple: true). The comment was from an earlier draft of the PR.

Remaining known issue: the E2E test (test-e2e) times out due to KVM not available on the runner + missing Pixel_API_27_AOSP AVD — this is pre-existing infrastructure flakiness on this repo, not introduced by this PR.

@TimeToBuildBob TimeToBuildBob force-pushed the bob/ci-node20-action-upgrades branch from 9c585b3 to 2d5b8d6 Compare June 29, 2026 20:00
- checkout@v2/v3 → v4 (all jobs)
- cache@v3 → v4 (build-rust, build-apk, test-e2e)
- cache/restore@v3 → v4 (build-apk, test, test-e2e)
- setup-java@v1 → v4 + distribution: temurin (build-apk, test, test-e2e)
- android-actions/setup-android@v2 → v3 (all jobs)
- Wandalen/wretry.action@master → v3.8.0_js_action (pinned)
- dtolnay/rust-toolchain@stable → @1.79.0 (pin for time crate compat)
- Remove unused NODE_VERSION env var
@TimeToBuildBob TimeToBuildBob force-pushed the bob/ci-node20-action-upgrades branch from 2d5b8d6 to b0e22b0 Compare June 29, 2026 22:14
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Rebased and squashed onto latest upstream master (which includes ef703ce — the auth settings PR that also fixed upload-artifact v4 and split artifact names).

The 4 previous commits conflicted with that merge because ef703ce added the fastlane_secrets runtime detection approach while my commits had pivoted to a fork-check approach. Rather than fighting each commit's conflicts, I squashed to a single clean commit that applies only what upstream doesn't have yet:

  • actions/checkout@v4 everywhere (was v2/v3)
  • actions/cache@v4 + actions/cache/restore@v4 (was v3)
  • actions/setup-java@v4 + distribution: temurin (was v1, no distribution)
  • android-actions/setup-android@v3 (was v2)
  • Wandalen/wretry.action@v3.8.0_js_action (was @master; kept fastlane_secrets condition from upstream)
  • dtolnay/rust-toolchain@1.79.0 pin (upstream had @stable)
  • Removed NODE_VERSION: '16' env var (unreferenced)

The Test job runner fix from the previous iteration is no longer needed — ef703ce already fixed the Test job by removing the jniLibs cache dependency (unit tests run on JVM, no native .so needed). That's a cleaner fix than my ubicloud runner change.

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.

1 participant