Skip to content

Commit

Permalink
Do not use docker-meta action
Browse files Browse the repository at this point in the history
  • Loading branch information
doganulus committed Jul 19, 2024
1 parent d6600ee commit 5c55bed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 36 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/builder-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}
Expand Down Expand Up @@ -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" \
Expand All @@ -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" \
Expand Down

0 comments on commit 5c55bed

Please sign in to comment.