Git clone based on branch #2528
-
I'm trying to trigger the clone for a pipeline only if there's a commit to the main branch. I have other actions in the pipeline that trigger if I commit to another branch that do not require a clone operation.
Can someone point me in the right direction for how to achieve conditional cloning in a pipeline? |
Beta Was this translation helpful? Give feedback.
Answered by
qwerty287
Oct 5, 2023
Replies: 1 comment 1 reply
-
Your indentation is wrong: clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
when:
- branch: main |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
amino-8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your indentation is wrong: