问题
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