Sorry, I'm honestly not familiar with Gitlab CI. I was just originally mentioning how the use of Docker in Github Actions allowed for amazing flexibility, which I thought was cool.
What makes Gitlab CI a better or more polished API than Github Actions? At first glance they look very similar
Allegedly there's a way to cache image layers and artifacts on Github. I've taken to pushing them to S3 buckets so my CI runs can be incremental where possible.
See [1] actions/cache for more details.
I haven't used GitLab for a while because most of the projects I'm working on are on GitHub, so I can't comment on GitLab CI.
The most common case where this matters is if someone pushes a failing commit to master, and then all PRs based on that commit will also fail, and then a fix is pushed to master. With Travis, you just need to re-run checks, but with GitHub actions, all those PRs need to be rebased on the new master.
Actually, actions/checkout will check out the merged tree by default.