-
Hi I am trying to achieve to do what github actions are doing with this configuration: on:
push:
branches:
- develop
paths:
- "docs/**/*"
pull_request:
branches:
- develop
paths:
- "docs/**/*" Meaning, that I want to run specific targets only when changes are detected. Main goal is to avoid multiple build configurations (or workflow flies) in the repo. Now there is one workflow which runs a nuke build pipeline, but ignoring changes in the docs subfolder, and an other workflow that runs a spell check target (from NUKE), but this workflow is only watching for changes inside the docs folder. The two example workflows Docs spell check on:
push:
branches:
- develop
paths:
- "docs/**/*"
pull_request:
branches:
- develop
paths:
- "docs/**/*"
... General build pipeline on:
pull_request:
paths-ignore:
- docs/**
push:
paths-ignore:
- docs/**
... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I would put the "if" logic inside the Nuke target. That target would run every time but it could get Git changed files and based on that it could do the docs spell check or not. I am currently using the same approach for running unit test just for changed files. Snippet:
|
Beta Was this translation helpful? Give feedback.
-
Nice :) Thank you |
Beta Was this translation helpful? Give feedback.
I would put the "if" logic inside the Nuke target. That target would run every time but it could get Git changed files and based on that it could do the docs spell check or not. I am currently using the same approach for running unit test just for changed files.
Snippet: