I have added a job in the existing circleci workflow, I would like to run that job only if a yaml file is changed in the repo. Is there any way to do it ? TIA.
you can detect changes in circlci build step and run job only if yml files changed
- run: |
git show --name-only ${CIRCLE_SHA1} | grep .yml
if [ $? -eq 0 ]; then
echo "yml files changed"
// Do your job steps
fi