Skip to content

Update GitHub Actions Workflow to Modern Standards #626

@hoatle

Description

@hoatle

Summary

The project's GitHub Actions workflow (.github/workflows/main.yaml) uses deprecated features and actions that are no longer supported. This causes warnings and potential failures in CI/CD pipelines.

Issues Identified

  1. Deprecated actions/checkout@v2: Runs on Node.js 20, which is deprecated. Actions will be forced to Node.js 24 starting June 2nd, 2026.
  2. Deprecated ::set-env commands: Disabled for security reasons. Replaced with environment files.
  3. Outdated action versions: Some actions may have newer versions with better support.

Changes Made

  • Updated all actions/checkout@v2 to actions/checkout@v4 for Node.js 24 compatibility.
  • Replaced echo "::set-env name=VAR::value" with echo "VAR=value" >> $GITHUB_ENV in scripts:
    • scripts/normalize_github_actions.sh
    • scripts/re_export_env_var.sh
  • Verified workflow runs without deprecation warnings.

Further Improvements

  • Consider updating other actions to latest versions (e.g., andrewmcodes/rubocop-linter-action to v3.x or newer).
  • Review and update Docker actions (azure/docker-login@v1 is deprecated; use docker/login-action@v3).
  • Add workflow dispatch for manual triggers if needed.
  • Implement caching for Bundler and Docker layers to speed up builds.

Verification

  • Workflow runs successfully without Node.js 20 warnings.
  • All environment variable setting works via $GITHUB_ENV.
  • CI/CD pipeline passes with updated actions.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions