Possible to commit files after workflow runs? #26152
-
I’m trying to have GitHub perform an action on some files in my repo every time one of them gets edited within the GH web interface. The action performs but the files that are generated afterwards are lost when the workflow finishes. I’d like them to go into an ‘output/‘ directory inside the root of my repo. How can I go about this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @chris-c-thomas , Github hosted runner will be released after workflow completed, thus it will not store the generated files, you need to push the files to repo. Step1: put the generated files into dir ‘output’. Step2: push the output folder to your repo. You can check my sample code below, my repo here.
Hope it helps. |
Beta Was this translation helpful? Give feedback.
-
@weide-zhouthis is exactly what I was looking for! Thank you for providinng an example, it’s clear and concise! |
Beta Was this translation helpful? Give feedback.
Hi @chris-c-thomas ,
Github hosted runner will be released after workflow completed, thus it will not store the generated files, you need to push the files to repo.
Step1: put the generated files into dir ‘output’.
Step2: push the output folder to your repo.
You can check my sample code below, my repo here.