ocaml-dune / binary-distribution

A web page for dune binary distribution
https://preview.dune.build/
ISC License
2 stars 5 forks source link

First try to prevent github from starting useless runs #76

Open ElectreAAS opened 12 hours ago

ElectreAAS commented 12 hours ago

This is an attempt at fixing #45. In the issue @Leonidas-from-XIV raises a good point: if the previous run wasn't 24h ago for some reason, then this will make it wait until a new commit. This isn't ideal, but there is no direct way in github actions to get the status of the previous run. A solution may be to hit the github api and ask there, but that requires a token which we may or may not have. Another would be to ask around the system where we put the previous binaries, and compute the time difference... Just wanted to get the ball rolling

maiste commented 11 hours ago

There is, but it requires having the pipeline in the same organisation... About the token solution, with the actions we could generate a token to be able to hit the GitHub API (as it would be reading mode). A solution, a bit different from the one with the time, but that would work too, is to read metadata.json and check if the HEAD commit is different from the last commit we have register.