How would I go about changing a file in another repo as a step in drone?

Hey all,

I’m trying to clone the repo, change the version number of a container in a manifest in another repo, and push it back to github once my container step is finished. What’s a good way to go about this? Or am I missing something?

Thank you!

pipeline steps are really just shell scripts, so you would accomplish this task by writing the necessary shell commands to clone a repository, update a file, and push your changes. For example:

    from_secret: ssh_key
- mkdir -p /root/.ssh
- echo -n "$SSH_KEY" > /root/.ssh/id_rsa
- chmod 600 /root/.ssh/id_rsa
- git clone
- cd bar
- echo 1.0.0 > VERSION
- git add .
- git commit -m "updated version"
- git push origin master

this is not meant to be a complete example, and could be missing some pieces, but hopefully this demonstrates that pipelines are just scripts and that you can solve pretty much any task by writing a standard shell script.

Brilliant, thank you very much!