This assumes no gems at all.

actions - setup-ruby

  • main.yml
      steps:
        - uses: actions/checkout@v2
    
        - uses: actions/setup-ruby@v1
          with:
            ruby-version: '2.7'
    
        - run: ruby hello.rb