julia-actions / cache

A shortcut action to cache Julia artifacts, packages, and registries.
MIT License
38 stars 9 forks source link

Soft fail registry update #143

Closed IanButterworth closed 2 months ago

IanButterworth commented 2 months ago

Fixes #142

Would this mark the job as failed even if steps succeeded afterwards?

IanButterworth commented 2 months ago

According to ChatGPT this should work:

In GitHub Actions, if a step within a job is marked with continue-on-error: true and it fails, the job will continue executing the subsequent steps. Whether the job as a whole is marked as successful or not depends on the outcomes of the remaining steps.

Here's what happens:

  1. Step with continue-on-error: true fails: This failure is ignored, and the job proceeds to the next steps.

  2. Subsequent steps succeed: If all the subsequent steps succeed, then the overall job will be marked as successful, despite the earlier step failure. This is because the failure of a step with continue-on-error: true does not contribute to the final job status.

  3. Subsequent steps fail: If any of the subsequent steps fail (and they are not marked with continue-on-error: true), then the job will be marked as failed.

In summary, a job can be marked as successful if a step with continue-on-error: true fails, as long as the steps that follow it succeed.

IanButterworth commented 2 months ago

Successfully tested here

https://github.com/IanButterworth/PowerMonitor.jl/actions/runs/10644589690/job/29509494273#step:3:140