How to run an arbitrary job on a commit?


#1

How do I run a certain job on a commit?
Also, how do I make the build job not mandatory?


#2

If you have a single job called “build” and no workflow, then this will be run whenever you push.

If you want to run a job called something else, then define that job and set up a custom workflow:

workflows:
  version: 2
  commit-workflow:
    jobs:
      - myjob

Would expand on what you mean here?


#3

Eh, I see how it works. Thanks!


#4

Great. Incidentally, the name of the workflow commit-workflow is arbitrary - you can call it anything. That’s what one of my workflows is called.


closed #5

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.