Stream: coq-community devs & users

Topic: Add "outputs" option to docker action


view this post on Zulip Ali Caglayan (Apr 29 2021 at 21:12):

The docker github action is able to output the container https://github.com/docker/build-push-action/issues/225. Can we add something like this to the docker-coq action? It would be useful to be able to continue working with the container after the build. Building documentation, for example.

view this post on Zulip Ali Caglayan (Apr 29 2021 at 21:12):

That way, I can have multiple jobs working on the same build artefacts

view this post on Zulip Théo Zimmermann (Apr 30 2021 at 08:15):

This action is written in Typescript (it's not a Docker-based action like Docker-Coq-Action). I think that Docker actions are less flexible but @Erik Martin-Dorel may confirm.

view this post on Zulip Théo Zimmermann (Apr 30 2021 at 08:18):

One thing that you could do though would be to use disable the uninstall phase and use the upload-artifact action to save the contents of .opam and anything else you need, and the next jobs could also use the Docker-Coq-Action but completely override the custom_script to run exactly what you need.

view this post on Zulip Erik Martin-Dorel (Aug 11 2021 at 18:25):

Dear @Ali Caglayan, (sorry for replying that late)
Indeed, as pointed out by @Théo Zimmermann, there are two kinds of GH Actions: Docker-based ones and TypeScript-based ones;
Docker-container actions are less flexible as the command is run in isolation;
However, your use case might be addressed by using both docker-coq-action (customized with either after_script: or custom_script:) and upload-artifact.
I've recently added this section in the docker-coq-action README to document this in more depth:
https://github.com/coq-community/docker-coq-action#artifacts

view this post on Zulip Ali Caglayan (Aug 11 2021 at 18:28):

Hi, thanks for the reply. This is what I ended up doing: https://github.com/HoTT/HoTT/pull/1562/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR135

view this post on Zulip Ali Caglayan (Aug 11 2021 at 18:28):

tar ing before uploading github actions artifacts is much quicker btw

view this post on Zulip Erik Martin-Dorel (Aug 11 2021 at 18:36):

Ali Caglayan said:

Hi, thanks for the reply. This is what I ended up doing: https://github.com/HoTT/HoTT/pull/1562/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR135

OK; thanks for your pointer.
indeed, using the standard action for uploading artifacts + the custom_script: field like you do seems the most flexible solution.

Anyway, feel free to open some issue directly in https://github.com/coq-community/docker-coq-action/issues if you think there's some blocking issue or a missing customization…


Last updated: Jun 03 2023 at 17:29 UTC