ersilia-os / eos-template

Template repository to add new models to the Ersilia Model Hub
GNU General Public License v3.0
1 stars 2 forks source link

Run Git Action only on workflow SUCCESS #29

Closed GemmaTuron closed 1 year ago

GemmaTuron commented 1 year ago

Currently, we are running actions based on workflow completion, in the following order:

  1. Model Test
  2. Update to S3
  3. Update to DockerHub

The workflow completion does not mean that it will run only if the workflow has succeeded, it runs in any case, which then makes the pipeline useless since models that fail the test will still be on DockerHub. I have been playing with this model (eos7pw8) to find the right combination of if statements. We need to add the following if statement on the Update to S3 and Update to DockerHub: if: ${{ github.event.workflow_run.conclusion == 'success' }} And if we want both statements (the one we had and this new one) This should be the syntax: ${{ github.repository != 'ersilia-os/eos-template' && github.event.workflow_run.conclusion == 'success' }} You can see how it works in this pipeline of actions

GemmaTuron commented 1 year ago

I've updated the relevant workflow files (commits #118 and #119)