How would I use Travis to automatically update a Github repo with result of build?

不羁的心 提交于 2021-02-17 02:29:28

问题


My real need is somewhat more complicated, but I think this simplification captures the essence:

What I would like to do is, on every GitHub check-in, if the rest of the Travis build succeeds, to create an artifact from the code (a minified version of the JavaScript that makes up the main source code.) Then of course, I want Travis to check that back into GitHub.

I haven't tried this yet, because I see an immediate problem: an infinite loop. If Travis checks this into GitHub, then of course Travis would notice another check-in and run another build, create another artifact...

How could I best avoid this?


回答1:


Travis will ignore all commits whose message contains [ci skip], so when you commit the minified scripts from travis make sure that is part of the message. If you need any more help I'd be happy to give some code examples.



来源:https://stackoverflow.com/questions/24581412/how-would-i-use-travis-to-automatically-update-a-github-repo-with-result-of-buil

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!