Is anyone using Github to manage there flow develo...
# ask-community
g
Is anyone using Github to manage there flow development and can you specify the branch and SHA for the flow to use for execution
j
Hey @Gregory Hunt - are you using Projects?
if so, you can define the branch the deployment should load your flow code from by defining it in the
pull
step of the prefect.yaml file
g
Just started setup a repo with projects
j
nice!
so your prefect.yaml pull step would look something like this
Copy code
pull:
  - prefect.projects.steps.git_clone_project:
      repository: <https://github.com/PrefectHQ/prefect>
      branch: main
      access_token: "{{ prefect.blocks.secret.repo-pat }}"
thank you 1
g
@Jamie Zieziula can you pass in a commit sha
j
You can with 2.10.13, released yesterday. See the example that uses
run_shell_script
with in the announcement.
g
@Jeff Hale This is awesome, so with this type of project flow we would be building an immutable docker image with the code preinstalled for the deployment execution
👍 1
I want to use cloudrunjobs, so I would then be able to execute that deploy in cloud run?
This is very exciting, and i like it better than pulling code from a storage block.
j
Glad to hear it! Yep, just use a CloudRun job type for the work pool and worker.
g
@Jeff Hale in this workflow, when you update and push a new deployment then, the old deployment is not removed correct?
j
Depends how you do things. You will overwrite the existing deployment if you don’t change the deployment name or entrypoint function.