I am starting to replace my old CI system, Travis, with the new Github Action system.
It looks pretty promising for now with only one flaw.
How should we set up the link for Github badge on the readme page?
There are two problems that I can see
Github Action log pages are per-job based instead of per-workflow instance-based. To make it more clear, if we look at this page, https://github.com/JiayinCao/SORT/runs/366500828, there is no way to pick the instance of the workflow itself, but only the job in it. However, the badge is per workflow-based, meaning each workflow has its own badge, but not the jobs in it. The granularity doesn’t match, meaning there is no way to properly set up the link of the badge.
For people, who is not logged in, there is no Action tab in Github. The link like this, https://github.com/JiayinCao/SORT/actions?query=workflow%3A%22Build+SORT%22, will result in 404 page. Other platforms like Travis, appveyor, provide a link that automatically links to the latest instance of building process.
But unfortunately, it doesn’t solve all the problems. The link automatically picks one of my jobs every time I try it, there is no perfect job to pick because the first problem I mentioned.
And the other problem is, in my case, I have a filter to avoid triggering Github Action on push on certain files. If I push those files, the link will fail due to the lack of latest action and it results in this single line page.
Will show the result of the “Build Sort” workflow, including all OSs, and if you want to have one per job, you should define each job in each own workflow (the limit is 20 workflow if I am not mistaken).
For the filter issue, can you try the link above and see if it will work as this one is direct from Github no external script is used.
2. Thanks for your suggestion. Due to security restrictions currently there’s no plan on showing the Actions tab, filters page or the logs to an anonymous user. There is no timeline to change that.
3. Could you please share the detail link in your first comment? Since the files are excluded, push those files will not trigger the workflow. What kind of filter did you use in your badge link?