mattermost / mattermost-plugin-starter-template

Build scripts and templates for writing Mattermost plugins.
https://developers.mattermost.com/extend/plugins/
Apache License 2.0
128 stars 120 forks source link

Avoid running daily workflow jobs on forks #180

Closed mickmister closed 1 year ago

mickmister commented 1 year ago

Summary

More context here https://community.mattermost.com/private-core/pl/s4shju1pwbyabgchwd83mq8h1w

There have been some issues coming up with forked repositories reaching usage limits, due to the plugin project CI workflows running every day.

This PR makes it so these jobs only run daily on Mattermost's copy, to avoid running on forks.

I'm wondering if we can instead make this a holistic change for all repos by applying in the shared actions repo https://github.com/mattermost/actions/blob/main/plugin-ci/test/action.yaml, but I'm not sure this is possible.

Ticket Link

Fixes https://mattermost.atlassian.net/browse/MM-52588

codecov-commenter commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (b874f47) 5.26% compared to head (c55c35a) 5.26%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #180 +/- ## ====================================== Coverage 5.26% 5.26% ====================================== Files 3 3 Lines 38 38 ====================================== Hits 2 2 Misses 36 36 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

mickmister commented 1 year ago

@spirosoik Do you have any idea if this can be applied to the actions repo instead of applying this to each individual repository?

spirosoik commented 1 year ago

@mickmister yes we can do this. I can check in detail.

mickmister commented 1 year ago

From the original thread discussing this, it's unclear if it's the compute resources, or artifact storage/retention that is causing the over-usage issues. Is there more we can do to avoid incurring costs on our side, in regards to avoiding artifact retention for nightly jobs? cc @spirosoik

mickmister commented 1 year ago

Closing in favor of https://github.com/mattermost/actions/pull/10