Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
woj-tek opened this issue Jun 26, 2024 · 1 comment · Fixed by #2748
Closed
1 task done
Labels

Comments

@woj-tek
Copy link
Contributor

woj-tek commented Jun 26, 2024

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)

@woj-tek
Copy link
Contributor Author

woj-tek commented Jul 15, 2024

Created PR #2748

One thing to keep in mind is to set PUBLISH_DOCKER_IMAGE_ENABLED to true in the repo variables before merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants