Currently, the Docker images published to DockerHub do not include the latest tag. The workflow only publishes tags specific to the release version (e.g., v1.0.0) and the dev* tags.
Not having a latest tag makes it less convenient for users to pull the most recent stable release without explicitly specifying the exact version number every time.
Proposed Solution: We can easily fix this by adding a small step to the manifest job in the .github/workflows/build-docker.yaml workflow file. The step will create and push a latest manifest that points to the same amd64 and arm64 images, but only when a release tag (starting with v) is pushed.
Here is the proposed addition to the manifest job:
- name: Create and push latest manifest
if: startsWith(needs.release.outputs.version, 'v')
run: |
docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:latest \
--amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:${{ needs.release.outputs.version }}-amd64 \
--amend ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:${{ needs.release.outputs.version }}-arm64
docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.image }}:latest
Could you please add this step after the existing "Create and push manifest" step? Thank you!
Currently, the Docker images published to DockerHub do not include the latest tag. The workflow only publishes tags specific to the release version (e.g., v1.0.0) and the dev* tags.
Not having a latest tag makes it less convenient for users to pull the most recent stable release without explicitly specifying the exact version number every time.
Proposed Solution: We can easily fix this by adding a small step to the manifest job in the .github/workflows/build-docker.yaml workflow file. The step will create and push a latest manifest that points to the same amd64 and arm64 images, but only when a release tag (starting with v) is pushed.
Here is the proposed addition to the manifest job:
Could you please add this step after the existing "Create and push manifest" step? Thank you!