miniflux / v2

Minimalist and opinionated feed reader
https://miniflux.app
Apache License 2.0
6.44k stars 702 forks source link

Make build actions be run conditionally (especially docker build that requires secrets and fails on forks) #2714

Open woj-tek opened 3 days ago

woj-tek commented 3 days ago

From my comment in #839

Could do docker.yml action be somehow modified and run/executed only if some env variable is set (or secret present)? Currently, after forking the repo (to create a PR) I got the action run as well and it fails as I don't have the secrets set... I think that conditional run would be better instead of pushing MB of data to docker hub each day?

I naively added if: github.repository == 'miniflux/v2' in my fork -- would that be sufficient (to make PR) or better solution would be required? (from what I read it's not possible to use conditions based on secrets - only on environment variables so using env.var would require changing main miniflux repo configuration)