Skip to content

Investigate labels creation to GitHub workflows #57

Description

@sbesson

Container annotations following the OCI image specification are currently defined in the Dockerfile

LABEL org.opencontainers.image.created="unknown"
LABEL org.opencontainers.image.revision="unknown"
LABEL org.opencontainers.image.source="https://github.com/openmicroscopy/omero-server-docker"

Their value is updated as part of the release workflow in

perl -i -pe 's/OMERO_VERSION=(\S+)/OMERO_VERSION=$(VERSION)/' Dockerfile
perl -i -pe 's/(org.opencontainers.image.created=)"([^"]+)"/$$1"$(RELEASE)"/' Dockerfile
perl -i -pe 's/(org.opencontainers.image.revision=)"([^"]+)"/$$1"$(COMMIT)"/' Dockerfile

It might be worth investigating the labels field of docker/build-push-action maybe re-using the workflow defined in https://github.com/docker/build-push-action/blob/646552f0a10fc45d23fb5d14bdae567ea53969e3/docs/advanced/tags-labels.md for creating these labels as part of the GitHub workflow.

An advantage of this approach is that combined with the removal of the build/push action, it might make the wrapping Makefile redundant with a single git tag -s x.y.z-b && git push required for triggering the release of a new set of images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions