Skip to content

Use latest Ruby version with GHA variable fallback #1

Use latest Ruby version with GHA variable fallback

Use latest Ruby version with GHA variable fallback #1

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
env:
RUBY_VERSION: ${{ vars.RUBY_VERSION || '3.3' }}
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ env.RUBY_VERSION }}

Check failure on line 15 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / Tests

Invalid workflow file

The workflow is not valid. .github/workflows/tests.yml (Line: 15, Col: 11): Unrecognized named-value: 'env'. Located at position 1 within expression: env.RUBY_VERSION
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run Tests
run: bundle exec rake