diff --git a/.github/workflows/builder-build.yml b/.github/workflows/builder-build.yml index d055c46..d9695da 100644 --- a/.github/workflows/builder-build.yml +++ b/.github/workflows/builder-build.yml @@ -29,13 +29,13 @@ jobs: - name: Maximize build space uses: easimon/maximize-build-space@v10 with: - root-reserve-mb: 2048 + root-reserve-mb: 2048 # Reserve disk space for repository remove-dotnet: 'true' remove-android: 'true' remove-haskell: 'true' remove-codeql: 'true' remove-docker-images: 'true' - build-mount-path: '/var/lib/docker' + build-mount-path: '/var/lib/docker' # The remaining space only for Docker - name: Restart docker run: sudo service docker restart @@ -53,28 +53,6 @@ jobs: - name: Set current date as the version run: echo "AUTOWARE_VERSION=$(date +'%Y%m%d')" >> $GITHUB_ENV - - name: Docker meta - id: meta-builder - uses: docker/metadata-action@v4 - with: - images: ghcr.io/bounverif/autoware - tags: | - type=raw,value={{date 'YYYYMMDD'}} - flavor: | - latest=auto - suffix=-builder,onlatest=true - - - name: Docker meta - id: meta-builder-with-cache - uses: docker/metadata-action@v4 - with: - images: ghcr.io/bounverif/autoware - tags: | - type=raw,value={{date 'YYYYMMDD'}} - flavor: | - latest=auto - suffix=-builder-with-cache,onlatest=true - - name: Build builder image uses: docker/build-push-action@v6 with: @@ -83,7 +61,9 @@ jobs: target: autoware-builder build-args: | "AUTOWARE_VERSION=${{ env.AUTOWARE_VERSION }}" - tags: "${{ steps.meta-builder.outputs.tags }}" + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-builder + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.AUTOWARE_VERSION }}-builder load: true # push: true cache-from: type=gha @@ -97,7 +77,9 @@ jobs: target: autoware-builder-with-cache build-args: | "AUTOWARE_VERSION=${{ env.AUTOWARE_VERSION }}" - tags: "${{ steps.meta-builder-with-cache.outputs.tags }}" + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-builder-with-cache + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.AUTOWARE_VERSION }}-builder-with-cache load: true # push: true cache-from: type=gha diff --git a/Dockerfile b/Dockerfile index ee5f146..c969093 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,3 @@ -FROM ubuntu:22.04 AS autoware-meta - -LABEL org.opencontainers.image.vendor ="tr.edu.bogazici.cmpe.bounverif" -LABEL org.opencontainers.image.version="0.1.0" -LABEL org.opencontainers.image.authors="Bogazici University Verification Group" -LABEL org.opencontainers.image.source="https://github.com/bounverif/autoware" -LABEL org.opencontainers.image.title="Autoware" - FROM ubuntu:22.04 AS autoware-base ARG TARGETARCH @@ -14,6 +6,13 @@ ENV VERSION_ID=22.04 ENV CACHEMOUNT_PREFIX=/${TARGETARCH}/${ID}${VERSION_ID} ENV DEBIAN_FRONTEND=noninteractive +# Metadata +LABEL org.opencontainers.image.vendor="tr.edu.bogazici.cmpe.bounverif" +LABEL org.opencontainers.image.version="0.1.0" +LABEL org.opencontainers.image.authors="Bogazici University System Verification Group" +LABEL org.opencontainers.image.source="https://github.com/bounverif/autoware" +LABEL org.opencontainers.image.title="Autoware" + # Autoware variables ARG AUTOWARE_VERSION=latest ENV AUTOWARE_VERSION=${AUTOWARE_VERSION} @@ -134,7 +133,7 @@ RUN --mount=type=bind,from=autoware-source,source=${AUTOWARE_SOURCE_DIR},target= --base-paths ${AUTOWARE_SOURCE_DIR} \ --build-base ${AUTOWARE_BUILD_DIR} \ --packages-up-to autoware_launch \ - --event-handlers console_cohesion+ console_package_list+ desktop_notification-\ + --event-handlers console_cohesion+ console_package_list+ summary- desktop_notification-\ --cmake-args \ -DCMAKE_BUILD_TYPE=Release \ " -Wno-dev" \ @@ -155,7 +154,7 @@ RUN --mount=type=cache,target=${AUTOWARE_BUILD_DIR},id=autoware-build-${AUTOWARE --build-base ${AUTOWARE_BUILD_DIR} \ --install-base ${AUTOWARE_INSTALL_DIR} \ --packages-up-to autoware_launch \ - --event-handlers console_cohesion+ console_package_list+ desktop_notification-\ + --event-handlers console_cohesion+ console_package_list+ summary- desktop_notification-\ --cmake-args \ -DCMAKE_BUILD_TYPE=Release \ " -Wno-dev" \