How to run an arbitrary job on a commit?

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

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?

Eh, I see how it works. Thanks!

1 Like

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.

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