trained-models icon indicating copy to clipboard operation
trained-models copied to clipboard

Delete issue branch if workflow fails

Open hvgazula opened this issue 1 year ago • 7 comments

Currently, the issue branch is retained in the remote repo and, (ideally) we want this branch to be deleted if the testing workflow fails. However, the key stumbling block is moving deletion into a separate job. For more info, see https://github.com/neuronets/trained-models/issues/104#issuecomment-1806672486

hvgazula avatar Nov 15 '23 20:11 hvgazula

Edward, do you think can look into this?

hvgazula avatar Nov 15 '23 20:11 hvgazula

Hello @hvgazula to make sure I understand this, do you want to delete the branch created in the repo if either singularity or docker fails?

gaiborjosue avatar Nov 17 '23 22:11 gaiborjosue

as the title suggests...if the workflow fails..

hvgazula avatar Nov 17 '23 22:11 hvgazula

Okay 👍Would you agree to perform this on the already existing 'failed' job?

gaiborjosue avatar Nov 17 '23 22:11 gaiborjosue

before that I want you to look at my workflow and tell what can fail...if it has any loopholes that I did not address but you did in yours.

hvgazula avatar Nov 17 '23 22:11 hvgazula

Sure, I am creating comments on your PR

gaiborjosue avatar Nov 17 '23 23:11 gaiborjosue

Hello @hvgazula, deleting the branch if fails is implemented: https://github.com/neuronets/trained-models/blob/hvgazula/issue104/.github/workflows/new_model.yml#L334

I tested it out and it worked.

gaiborjosue avatar Nov 18 '23 00:11 gaiborjosue