perf(ci): only publish artifacts on git version tags of main
Description
As a maintainer and/or contributor I want to have fast CI cycles so that I'm more productive and the community as a whole is growing faster because the contributions can be accepted at a rapid pace instead of the CI bogging everybody down.
Right now we have a lot of publishing tasks that take up resources (mostly) needlessly because they auto-publish artifacts such as container images and JVM API clients on every merged commit. This has the negative effect of slowing the CI down overall and also the other negative effect that we are risking hitting limitations on the free tiers that we are using (limits where the number of versions must stay below a certain number for npm packages or container images for example).
One example of this auto-publishing is the kotlin [1] packages and all the other **-publish.yaml files that we have for the container images.
[1] .github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml
Acceptance Criteria
- Go through every single .yaml file and produce a list of them which are currently doing auto-publishing on every commit to
main - Refactor the list of yaml's obtained in step 1 so that artifact publishing only happens on git tags.
- Make sure that the refactor happens in a way that the container image builds are still being tested as part of every PR.
Hello Team,
I was assigned on this task and will start to work on this as of today.
Thanks!
@raynatopedrajeta Got it, thank you!