diff --git a/src/main/java/io/kestra/plugin/git/Clone.java b/src/main/java/io/kestra/plugin/git/Clone.java index 98b4658..609941a 100644 --- a/src/main/java/io/kestra/plugin/git/Clone.java +++ b/src/main/java/io/kestra/plugin/git/Clone.java @@ -33,10 +33,13 @@ namespace: company.team tasks: - - id: clone - type: io.kestra.plugin.git.Clone - url: https://github.com/dbt-labs/jaffle_shop - branch: main + - id: wdir + type: io.kestra.plugin.core.flow.WorkingDirectory + tasks: + - id: clone + type: io.kestra.plugin.git.Clone + url: https://github.com/kestra-io/blueprints + branch: main """ ), @Example( @@ -47,12 +50,15 @@ namespace: company.team tasks: - - id: clone - type: io.kestra.plugin.git.Clone - url: https://github.com/kestra-io/examples - branch: main - username: git_username - password: "{{ secret('GITHUB_ACCESS_TOKEN') }}" + - id: wdir + type: io.kestra.plugin.core.flow.WorkingDirectory + tasks: + - id: clone + type: io.kestra.plugin.git.Clone + url: https://github.com/kestra-io/blueprints + branch: main + username: git_username + password: "{{ secret('GITHUB_ACCESS_TOKEN') }}" """ ), @Example( @@ -63,16 +69,19 @@ namespace: company.team tasks: - - id: clone - type: io.kestra.plugin.git.Clone - url: git@github.com:kestra-io/kestra.git - directory: kestra - privateKey: - passphrase: + - id: wdir + type: io.kestra.plugin.core.flow.WorkingDirectory + tasks: + - id: clone + type: io.kestra.plugin.git.Clone + url: git@github.com:kestra-io/kestra.git + directory: kestra + privateKey: "{{ secret('SSH_PRIVATE_KEY') }}" + passphrase: "{{ secret('SSH_PASSPHRASE') }}" """ ), @Example( - title = "Clone a GitHub repository and run a Python ETL script. Note that the `Worker` task is required so that the Python script shares the same local file system with files cloned from GitHub in the previous task.", + title = "Clone a GitHub repository and run a Python ETL script. Note that the `WorkingDirectory` task is required so that the Python script shares the same local file system with files cloned from GitHub in the previous task.", full = true, code = """ id: git_python @@ -88,8 +97,9 @@ branch: main - id: python_etl type: io.kestra.plugin.scripts.python.Commands - beforeCommands: - - pip install requests pandas > /dev/null + dependencies: + - requests + - pandas commands: - python examples/scripts/etl_script.py """