Skip to content

Commit

Permalink
feat: add metadata to docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisBrunner committed Apr 30, 2024
1 parent 1dfbc11 commit 37e173a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
id: parse-tag

build:
needs: [ get-tag ]
needs: [get-tag]
strategy:
matrix:
arch: [amd64, arm64]
Expand All @@ -42,13 +42,14 @@ jobs:
with:
image_name: aica-technology/network-interfaces
image_tags: ${{ steps.merge-tags.outputs.list }}
build_flags: --build-arg VERSION=${{ needs.get-tag.outputs.tag }}
dockerfile_path: Dockerfile
token: ${{ secrets.GITHUB_TOKEN }}

multi-arch:
runs-on: ubuntu-latest
name: Merge into a multi-arch image
needs: [ get-tag, build ]
needs: [get-tag, build]
steps:
- uses: aica-technology/.github/.github/actions/[email protected]
with:
Expand Down
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ROS2_VERSION=iron
ARG ROS2_VERSION=v1.0.0-iron
FROM ghcr.io/aica-technology/ros2-ws:${ROS2_VERSION} as base
USER ${USER}

Expand Down Expand Up @@ -131,3 +131,10 @@ COPY --from=apt-dependencies /tmp/apt /
COPY --from=install /tmp/communication-interfaces /usr
COPY --from=python /tmp/python-usr /usr
COPY --from=python-stubs /tmp/python-usr /usr

ARG VERSION
ARG ROS2_VERSION
LABEL org.opencontainers.image.title="AICA network-interfaces library"
LABEL org.opencontainers.image.description="AICA network-interfaces library (for ${ROS2_VERSION})"
LABEL org.opencontainers.image.version="${VERSION}"
LABEL tech.aica.image.metadata='{"type":"lib","base":{"name":"@aica/foss/ros2-ws","version":"'${ROS2_VERSION}'"}}'

0 comments on commit 37e173a

Please sign in to comment.