Sometimes it's helpful to run a container inside GitHub Actions, like if you want to run something isolated from the rest of the CI environment for one step. Docker already exists (at least on the Ubuntu runners), so we can just ahead and use it.
We could do this directly in the YAML, but extracting out to a script is helpful, especially so if you want to interact with the container itself. But you could also do a multiline string, or similar if desired.
For example, you might have a script like this:
#!/bin/sh