RogierdeRuijter / montepoeli

♟ A minimalistic mobile-first chess club website with too many non-functional features
0 stars 0 forks source link

Only publish production images when the version gets increased #416

Open RogierdeRuijter opened 4 years ago

RogierdeRuijter commented 4 years ago

When code gets merged to master the production images are always published. This should only be done if the version of the repo gets increased. Otherwise there is a mismatch in what code was used to release certain image versions.

For example, in GitHub a version of the code is tagged with 1.0.0. When code gets merged to master that does not increase the version of the repo. There will be images pushed with version 1.0.0, but this is no longer the code that is in the GitHub tag.

Therefore only release the production images if a version is increased.

The best thing would be to use some kind of conditional job that uses a variable set at runtime, but this is currently not support in Circleci

github-actions[bot] commented 4 years ago

Hee Ouwe schaker gefelicteerd me je eerste issue' first issue

RogierdeRuijter commented 4 years ago

Circleci discussion on running jobs conditionally. https://discuss.circleci.com/t/run-job-within-workflow-conditionally/34125.

They say it is better have different workflows. But now the question is how to set the parameters in the build pipeline