At present, the publish action tags a new image as "v0", meaning that "v0" can resolve to different images at different times.
|
- name: Publish image |
|
run: | |
|
echo ${{ secrets.GITHUB_TOKEN }} | docker login $REGISTRY -u ${{ github.actor }} --password-stdin |
|
docker tag $IMAGE_NAME $PUBLIC_IMAGE_NAME:v0 |
|
docker tag $IMAGE_NAME $PUBLIC_IMAGE_NAME:latest |
|
docker push $PUBLIC_IMAGE_NAME:v0 |
|
docker push $PUBLIC_IMAGE_NAME:latest |
Semver considers using major version zero for initial development to be optional:
Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.
However, it also considers modifying the package's contents after the package is released to be an absolute prohibition:
Once a versioned package has been released, the contents of that version MUST NOT be modified. Any modifications MUST be released as a new version.
So, whilst we are doing the right thing by using major version zero 🙂, we are doing the wrong thing by repeatedly tagging new images as "v0" 🙁. Instead, we should be incrementing the minor version component.
We took a similar approach when developing ehrQL. A user specified "v0" in their project.yaml, with the minor version component resolving to the most recent available release in the execution context (the local context tended to lag the secure backend context). The inconvenience of a backwards-incompatible change was deferred by specifying the minor version component. The user was expected to refactor at a more convenient time, as the most recent available release in the secure backend context really was the most recent available release overall.
At present, the
publishaction tags a new image as "v0", meaning that "v0" can resolve to different images at different times.research-template-docker/.github/workflows/main.yml
Lines 70 to 76 in 6ec03c1
Semver considers using major version zero for initial development to be optional:
However, it also considers modifying the package's contents after the package is released to be an absolute prohibition:
So, whilst we are doing the right thing by using major version zero 🙂, we are doing the wrong thing by repeatedly tagging new images as "v0" 🙁. Instead, we should be incrementing the minor version component.
We took a similar approach when developing ehrQL. A user specified "v0" in their
project.yaml, with the minor version component resolving to the most recent available release in the execution context (the local context tended to lag the secure backend context). The inconvenience of a backwards-incompatible change was deferred by specifying the minor version component. The user was expected to refactor at a more convenient time, as the most recent available release in the secure backend context really was the most recent available release overall.