The use case is to test with different Swift versions on Linux and since the latest Swift version is already installed, having a noop container image would be the fastest without duplicating the yaml code. I tried specifying “scratch” ( scratch - Docker Hub ) but that didn’t work. (This might be a really basic question, I don’t use docker otherwise)
What do you mean by “noop container image”? Could you describe how you use Docker in the workflow, ideally with the workflow file itself?
The GitHub Actions runner has the latest swift version installed, so that could be tested with a noop image instead of waiting 40 seconds for the swift:5.3 image to initialize.
Ah, so “noop” would be not using a container at all. The documentation for
jobs.<job_id>.container doesn’t mention any way to say “no container” (though I now see how it might be useful as part of a matrix build), so I assume the only option would be to move the build with 5.3 into a separate job without a
Docker itself definitely doesn’t offer a way, because if you don’t want to use a container you can just not use Docker.
I submitted an issue for it: Add
container · Issue #842 · actions/runner (github.com)