From b538e8fbcaeef6e232a1f770bb806c3963f1cdd7 Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Mon, 18 Sep 2023 14:40:12 +0200 Subject: [PATCH] feat: Added labels to all images as required by Artifacthub https://artifacthub.io/docs/topics/repositories/container-images/ --- .github/workflows/image.yml | 13 ++++++++++++- build/Dockerfile.suffix | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 0072f18..9ab949c 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -70,7 +70,18 @@ jobs: run: | cat build/Dockerfile.prefix > Dockerfile cat "flavour/${{ matrix.flavour.name }}/Dockerfile.flavour" >> Dockerfile - cat build/Dockerfile.suffix >> Dockerfile + + # Download mo + curl -sSL https://raw.githubusercontent.com/tests-always-included/mo/master/mo -o mo + chmod +x mo + + export BUILD_DATE=$(date -Ins) + + cat build/Dockerfile.suffix | ./mo >> Dockerfile + + rm mo + env: + FLAVOUR: "${{ matrix.flavour.name }}" - name: Clean up Docker run: | diff --git a/build/Dockerfile.suffix b/build/Dockerfile.suffix index a3e4a05..0cd79a8 100644 --- a/build/Dockerfile.suffix +++ b/build/Dockerfile.suffix @@ -24,3 +24,14 @@ USER cloudcontrol ENTRYPOINT ["/usr/local/bin/cloudcontrol"] WORKDIR /home/cloudcontrol CMD ["serve"] + +# Labels + +LABEL io.artifacthub.package.readme-url=https://github.com/dodevops/cloudcontrol +LABEL org.opencontainers.image.created={{BUILD_DATE}} +LABEL org.opencontainers.image.description="The cloud engineer's toolbox - {{FLAVOUR}} flavour" +LABEL org.opencontainers.image.documentation=https://github.com/dodevops/cloudcontrol +LABEL org.opencontainers.image.source=https://github.com/dodevops/cloudcontrol +LABEL org.opencontainers.image.title="cloudcontrol-{{FLAVOUR}}" +LABEL org.opencontainers.image.url=https://github.com/dodevops/cloudcontrol +LABEL org.opencontainers.image.vendor="DO! DevOps" \ No newline at end of file