How to self-create a docker image in GitHub Action then use it for steps?

Is it possible to omit using of Docker Hub and any docker image repo/registry to use a docker image in GitHub Actions?

I have a self-hosted runner Linux PC which is able to create my own docker image in any time. Is it possible to make a GitHub Action which in the first step create a docker image then in further steps everything is executed in this self-created docker image?

Of course, in the end of the full GitHub action/workflow self-created docker image should be removed and cleaned up everything.

In most of tutorial and blog site, there is only info about how can publish docker image to any registry via GitHub Action. I can not find any similar solutions. 🙁

Leave a Comment