From 0aed5bcb670e3eda23a241ba4c85a3be42bf83a7 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Wed, 17 Jul 2024 21:18:17 +0900 Subject: [PATCH 1/2] fix image organization Signed-off-by: Yutaka Kondo --- .github/actions/docker-build-and-push/action.yaml | 2 +- .github/actions/docker-build/action.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 4cf51296cdd..5a9081a57b3 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -121,7 +121,7 @@ runs: id: meta-autoware-universe uses: docker/metadata-action@v5 with: - images: ghcr.io/${{ github.actor }}/${{ inputs.bake-target }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} tags: ${{ steps.set-docker-tags.outputs.tags }} bake-target: docker-metadata-action-autoware-universe flavor: | diff --git a/.github/actions/docker-build/action.yaml b/.github/actions/docker-build/action.yaml index 67c2513ddc3..6e36e44fe6e 100644 --- a/.github/actions/docker-build/action.yaml +++ b/.github/actions/docker-build/action.yaml @@ -97,7 +97,7 @@ runs: uses: docker/login-action@v3 with: registry: ghcr.io - username: ${{ github.actor }} + username: ${{ github.repository_owner }} password: ${{ github.token }} - name: Run docker build From e600c5ee67280941c9e7451235fe2bcb6d0a0d0a Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Wed, 17 Jul 2024 13:13:03 +0900 Subject: [PATCH 2/2] disable cache (#77) Signed-off-by: Yutaka Kondo --- .github/actions/docker-build-and-push/action.yaml | 4 +--- .github/actions/docker-build/action.yaml | 5 +---- docker/Dockerfile | 7 ------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 5a9081a57b3..8239ea9bde9 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -59,7 +59,6 @@ runs: with: path: | var-cache-apt - var-lib-apt key: apt-get-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/package.xml') }} restore-keys: | apt-get-${{ inputs.platform }}-${{ inputs.name }}- @@ -71,8 +70,7 @@ runs: cache-map: | { "root-ccache": "/root/.ccache", - "var-cache-apt": "/var/cache/apt", - "var-lib-apt": "/var/lib/apt" + "var-cache-apt": "/var/cache/apt" } skip-extraction: true diff --git a/.github/actions/docker-build/action.yaml b/.github/actions/docker-build/action.yaml index 6e36e44fe6e..a49834d14b3 100644 --- a/.github/actions/docker-build/action.yaml +++ b/.github/actions/docker-build/action.yaml @@ -53,7 +53,6 @@ runs: with: path: | var-cache-apt - var-lib-apt key: apt-get-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/package.xml') }} restore-keys: | apt-get-${{ inputs.platform }}-${{ inputs.name }}- @@ -76,7 +75,6 @@ runs: with: path: | var-cache-apt - var-lib-apt key: apt-get-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/package.xml') }} restore-keys: | apt-get-${{ inputs.platform }}-${{ inputs.name }}- @@ -88,8 +86,7 @@ runs: cache-map: | { "root-ccache": "/root/.ccache", - "var-cache-apt": "/var/cache/apt", - "var-lib-apt": "/var/lib/apt" + "var-cache-apt": "/var/cache/apt" } skip-extraction: ${{ steps.cache-ccache.outputs.cache-hit && steps.cache-apt-get.outputs.cache-hit }} diff --git a/docker/Dockerfile b/docker/Dockerfile index a1792c6efff..24e2b91c2a8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,7 +9,6 @@ ARG ROS_DISTRO RUN rm -f /etc/apt/apt.conf.d/docker-clean \ && echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ gosu \ ssh \ @@ -25,7 +24,6 @@ WORKDIR /autoware # Set up base environment RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ ./setup-dev-env.sh -y --module base --runtime openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache \ @@ -46,7 +44,6 @@ RUN rm -f /etc/apt/apt.conf.d/docker-clean \ && echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ ./setup-dev-env.sh -y rosdep \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache @@ -91,7 +88,6 @@ ENV CCACHE_DIR="/root/.ccache" # Set up development environment RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache @@ -100,7 +96,6 @@ RUN --mount=type=ssh \ COPY --from=rosdep-depend /rosdep-core-depend-packages.txt /tmp/rosdep-core-depend-packages.txt # hadolint ignore=SC2002 RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get update \ && cat /tmp/rosdep-core-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ && apt-get autoremove -y && rm -rf "$HOME"/.cache @@ -153,7 +148,6 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install development tools and artifacts RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ ./setup-dev-env.sh -y --module dev-tools --download-artifacts openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache @@ -175,7 +169,6 @@ COPY --from=rosdep-depend /rosdep-exec-depend-packages.txt /tmp/rosdep-exec-depe # hadolint ignore=SC2002 RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --download-artifacts --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get update \