dsaltares / fetch-gh-release-asset

Github Action to download an asset from a Github release
MIT License
113 stars 70 forks source link

Turn 404 into warning #27

Closed ffMathy closed 2 years ago

ffMathy commented 3 years ago

Fixes #26.

dsaltares commented 2 years ago

I agree with @vojtapol. An action that downloads a release asset should fail when the release asset does not exist. That is a good default. If it is to do anything else, it should be via an option. However, I don't think that option should be added, for simplicity.

Thanks for the PR though, it is appreciated.

ffMathy commented 2 years ago

@dsaltares I totally agree. Normally. The reason I opened it, is because composite actions in GitHub Actions couldn't have if clauses, so it was impossible to optionally run your step.

Now they just implemented if clauses in composite actions, so it's now possible.

ffMathy commented 2 years ago

Actually @dsaltares I was a bit quick there. It's still an issue. If clauses in composite actions can't solve it.

The dilemma is that I have a deploy flow which stores the built output as an artifact on the release, so that if the release is re-released (or edited), it can skip the build process because it has already been built.

This is because we want to roll back to previous releases quickly.

So I want a way to say "fetch this release if it exists, but don't fail the whole pipeline".

I don't want to wrap if: failed() in all of the rest of my steps in my composite action.

Would it be possible to have a flag that can bypass this at least?

ffMathy commented 2 years ago

Related issue (showing it's still not possible to run continue-on-error on composite actions): https://github.com/actions/runner/issues/1457