Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 21, 2025

This PR introduces a new GitHub Action that automatically checks whether the Rails version used in the repository is up-to-date with the latest stable release available on RubyGems.

What it does

The action performs the following steps:

  1. Detects current Rails version from multiple sources (Gemfile.lock → Gemfile → bundle show)
  2. Fetches latest Rails version from the RubyGems API
  3. Compares versions and provides clear status reporting
  4. Shows upgrade guidance when outdated, including major version change warnings

Key Features

  • Manual trigger: Runs via workflow_dispatch for on-demand checking
  • Multi-source detection: Robust Rails version extraction with fallbacks
  • Error handling: Graceful handling of network issues and missing files
  • Rich output: Clear status messages with emojis and formatted step summaries
  • Upgrade guidance: Contextual advice for major vs minor version differences

Example Output

For this repository (Rails 5.2.8.1 vs latest 8.0.2.1):

=== Rails Version Check Results ===
Current Rails version: 5.2.8.1
Latest Rails version: 8.0.2.1

⚠️  Rails version is OUTDATED!
Consider upgrading from 5.2.8.1 to 8.0.2.1

📋 Note: You are on Rails 5.2.x, while the latest is 8.0.x
This may require a major version upgrade with breaking changes.

Usage

  1. Go to ActionsCheck Rails Version
  2. Click Run workflow
  3. Review results in the action logs and step summary

This helps maintain awareness of Rails version currency and assists in planning upgrades, especially for security and maintenance purposes.

Files Added

  • .github/workflows/check-rails-version.yml - Main workflow implementation
  • .github/workflows/README.md - Comprehensive documentation with usage examples

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • invalid-rubygems-url.com
    • Triggering command: curl -s --max-time 1 REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

This pull request was created as a result of the following prompt from Copilot chat.

Create a GitHub Action that checks whether the Rails version used in the repository is the latest version available. The action should:

  1. Determine the Rails version specified in the repository. This could be in the Gemfile or Gemfile.lock.
  2. Compare it against the latest stable version of Rails available from the RubyGems API.
  3. Provide a status output indicating whether the Rails version is up-to-date or not.
  4. If the Rails version is not up-to-date, output the latest version available.
  5. Ensure the action is triggered manually or via a workflow_dispatch event.

The action should be implemented in a new YAML workflow file in the repository.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Add GitHub Action to Check Rails Version Add GitHub Action to check Rails version against latest stable release Sep 21, 2025
@Copilot Copilot AI requested a review from pavelz September 21, 2025 23:55
Copilot finished work on behalf of pavelz September 21, 2025 23:55
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.

2 participants