The build execution bits of Travis appear to be open source: https://github.com/travis-ci/travis-build https://github.com/travis-ci/worker It should be possible to make a GitHub action that runs an existing .travis.yml.
https://github.com/marketplace/actions/run-travis-yml
The action executes the stage scripts making that part portable at first. It helps a lot migrating as not everything needs to be rewritten at once while already reducing the build-times on Travis.
Language handling is a different beast, but I had the same thought that with some Ruby know-how a port of the travis-build as a whole could be done.
If not even running locally.