guardian / grid

The Guardian’s image management system
https://www.theguardian.com/info/developer-blog/2015/aug/12/open-sourcing-grid-image-service
Apache License 2.0
1.44k stars 119 forks source link

run CI on `push` to ALL branches too (but only actually run if this is a pull_request [incl. from forks] OR push to a branch without a PR) #4239

Closed twrichards closed 5 months ago

twrichards commented 5 months ago

Prior to https://github.com/guardian/grid/pull/4238 we were running CI on custom runners which cost money, so we were only building once there was a PR, but now we're back using standard runners (i.e. free, since public repo) its useful to have a build for all pushes - however PRs from forks still need to be built and we don't want to build twice for pull_request and push for our internal branches, so added an if condition to the overall CI job to hopefully achieve the best of both worlds.

Looks to manifest correctly on this branch...

image
github-actions[bot] commented 5 months ago

Deploy build 12292 to TEST

All deployment options - [Deploy build 12292 to TEST](https://riffraff.gutools.co.uk/deployment/deployAgain?project=media-service%3A%3Agrid%3A%3Aall&build=12292&stage=TEST&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 12292 to TEST by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=media-service%3A%3Agrid%3A%3Aall&build=12292&stage=TEST&updateStrategy=MostlyHarmless)

From guardian/actions-riff-raff.

twrichards commented 5 months ago

Closing this since there's no way to avoid running duplicate builds when there is an active pull request - without introducing an additional 'job' to use the gh CLI and passing an output to the existing CI job which isn't worth the time/complexity when compared to having to raise a Draft PR when you want to deploy to TEST.