I’m working on a Haskell project and I want to build it inside the following Docker container:
This Docker container prepares nice environment for building statically linked Haskell binaries. I want to make use of this container, so I can attach such binaries to GitHub releases of my project. I already know how to build my project with GitHub actions, create binary files, create releases and attach my binaries to releases. But what I want now is to build my Haskell project not on the host machine provided by GitHub Actions, but inside that Docker container.
I’m okay with writing a separate Docker-based action for that (or reuse some existing one if it already exists). What I ultimately want to be able to do in my workflow:
- Copy repo inside the
- Run my custom command inside that container.
- Copy executable back to GitHub actions host so I can put it into release.
Is it possible to do so? And if yes, how can I achieve this goal?