-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update generate & Add template for GitHub container action #26
Update generate & Add template for GitHub container action #26
Conversation
Note: GitHub actions relies on the ${{ _ }} syntax, which conflicts with mustache. This can be workarounded by changing the delimiters beforehand, as suggested by theK42 <https://stackoverflow.com/a/13695429/9164010> and documented in https://mustache.github.io/mustache.5.html#Set-Delimiter
c2abac4
to
2a94c07
Compare
@liyishuai As this PR takes us even further away from your own proposal to use a |
My main purpose for a Makefile was to avoid copying files or commands. Whatever approach that better automates the generation process is good to me. |
👍 BTW note that from the current version of the PR, it'd be easy to add other yes/no (or open) questions within the script, e.g. to ask whether the user would like to get a Travis CI configuration or not, etc. (although such extra changes would deserve a separate PR, maybe) |
FTR, I also tried to install the npm "mustache" package but it doesn't support YAML, only JSON (like the OCaml version IIUC). |
f54013c
to
7303c58
Compare
Yes but this is not a issue at first sight, the mustache ecosystem is not very uniform, but I guess that the current script should be OK with any mustache supporting YAML − cf. the remark in the README anyway:
|
(FTR that README remark had been added in #17 ) |
I confirm the current script works well with mustache-go. |
@erikmd What do you think of removing the prompt and making the generation of files entirely automated based on whether some variables are set or not in the |
One major interest of a fully automated generation process (without any prompt) would be that we could add some more automation: CI checks that the generated files correspond to the ones checked in the repository / a call to @coqbot to regenerate the files based on the latest version of the template and the |
One inspirational example is the automation that is used to manage https://github.com/conda-forge (see in particular https://github.com/conda-forge/conda-smithy). |
Yes, I fully agree with your idea :-)
👍 Looks great (IINM you suggest to incorporate in the Travis/GitHub actions config a job that would run on the target project repo, clone the coq-community templates repo, and do a checkup?), anyway that feature itself would probably deserve a separated PR ;-) |
Yes, that's just an idea, but worth being discussed further of course. The problem of automatically checking compatibility with the latest templates would be that it would force people to manually update at every iteration of the templates, even if that wasn't needed for them. A possible solution could be:
Just food for thought for now. Related to #20. |
b6d0fcc
to
11de289
Compare
Hi @Zimmi48
done, feel free to react if you'd like that I refactor the
BTW this new version of the PR maybe reduces a bit the "discoverability" of the GitHub action template, as the selected examples do not contain |
Exactly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thank you very much.
3cb3a8c
to
b633986
Compare
done, thanks @Zimmi48 for the review! in passing I fixed the condition related to |
7bd2371
to
8369930
Compare
sorry wait a minute before merging, I did a too aggressive rebase -i… |
namely if meta.yml contains a "travis" (resp. "action") key with a different value than "false".
8369930
to
9f2a454
Compare
@Zimmi48 done :) − sorry for the noise… |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think generating default.nix
or not should be based on whether travis
is activated. You could test tested_coq_nix_versions
instead.
In particular, we might want to add support for building with Nix using GitHub Actions as well. |
Feel free to merge by yourself BTW 😉 |
9f2a454
to
f623a57
Compare
@Zimmi48 indeed; updated as suggested. |
This PR is a follow-up of a discussion with @Zimmi48, and of the release of docker-coq-action:
https://github.com/coq-community/docker-coq-action/releases/tag/v1.0.0
see the commit messages for more details