From 412410de168cc47cf492dd12038653c5abe2db35 Mon Sep 17 00:00:00 2001 From: Louis Brunner Date: Tue, 30 Apr 2024 10:28:22 +0100 Subject: [PATCH] feat: add metadata to docker image --- .github/workflows/build-release.yml | 5 +++-- Dockerfile | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index bf869b26b..69f1ff0ac 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -64,7 +64,7 @@ jobs: shell: bash build: - needs: metadata + needs: [check-version, metadata] strategy: matrix: arch: [amd64, arm64] @@ -90,13 +90,14 @@ jobs: with: image_name: ${{ needs.metadata.outputs.image_name }} image_tags: ${{ steps.merge-tags.outputs.list }} + build_flags: --build-arg VERSION=${{ needs.check-version.outputs.version }} dockerfile_path: Dockerfile token: ${{ secrets.GITHUB_TOKEN }} multi-arch: runs-on: ubuntu-latest name: Merge into a multi-arch image - needs: [ metadata, build ] + needs: [metadata, build] steps: - uses: aica-technology/.github/.github/actions/ghcr-manifest-merge@v0.6.1 with: diff --git a/Dockerfile b/Dockerfile index eedf3983f..fbc09a471 100644 --- a/Dockerfile +++ b/Dockerfile @@ -251,3 +251,9 @@ COPY --from=dependencies /tmp/deps /usr COPY --from=install /tmp/cl /usr COPY --from=python /tmp/python-usr /usr COPY --from=python-stubs /tmp/python-usr /usr + +ARG VERSION +LABEL org.opencontainers.image.title="AICA control-libraries" +LABEL org.opencontainers.image.description="AICA control libraries" +LABEL org.opencontainers.image.version="${VERSION}" +LABEL tech.aica.image.metadata='{"type":"lib"}'