Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate labels creation to GitHub workflows #57

Open
sbesson opened this issue Apr 28, 2021 · 0 comments
Open

Investigate labels creation to GitHub workflows #57

sbesson opened this issue Apr 28, 2021 · 0 comments

Comments

@sbesson
Copy link
Member

sbesson commented Apr 28, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant