diff --git a/.github/actions/docker-build-and-push-base/action.yaml b/.github/actions/docker-build-and-push-base/action.yaml index 7912be7a23..8a5a779904 100644 --- a/.github/actions/docker-build-and-push-base/action.yaml +++ b/.github/actions/docker-build-and-push-base/action.yaml @@ -8,19 +8,10 @@ inputs: build-args: description: Additional build args. required: false - dockerhub-token: - description: Docker Hub token. - required: true runs: using: composite steps: - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ github.repository_owner }} - password: ${{ inputs.dockerhub-token }} - - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 @@ -33,7 +24,7 @@ runs: id: meta-base uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=${{ steps.date.outputs.date }} bake-target: docker-metadata-action-base @@ -44,7 +35,7 @@ runs: id: meta-base-cuda uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=cuda-latest type=raw,value=cuda-${{ steps.date.outputs.date }} @@ -52,6 +43,13 @@ runs: flavor: | latest=false + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.token }} + - name: Build and Push to GitHub Container Registry uses: docker/bake-action@v5 with: diff --git a/.github/actions/docker-build-and-push-cuda/action.yaml b/.github/actions/docker-build-and-push-cuda/action.yaml index b6322e40d1..bf9d9ca085 100644 --- a/.github/actions/docker-build-and-push-cuda/action.yaml +++ b/.github/actions/docker-build-and-push-cuda/action.yaml @@ -11,19 +11,10 @@ inputs: build-args: description: Additional build args. required: false - dockerhub-token: - description: Docker Hub token. - required: true runs: using: composite steps: - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ github.repository_owner }} - password: ${{ inputs.dockerhub-token }} - - name: Install jq and vcstool run: | sudo apt-get -y update @@ -77,7 +68,7 @@ runs: id: meta-universe-sensing-perception-devel-cuda uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-sensing-perception-devel-cuda-${{ inputs.platform }} type=raw,value=universe-sensing-perception-devel-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -89,7 +80,7 @@ runs: id: meta-universe-sensing-perception-cuda uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-sensing-perception-cuda-${{ inputs.platform }} type=raw,value=universe-sensing-perception-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -101,7 +92,7 @@ runs: id: meta-universe-devel-cuda uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-devel-cuda-${{ inputs.platform }} type=raw,value=universe-devel-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -113,7 +104,7 @@ runs: id: meta-universe-cuda uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-cuda-${{ inputs.platform }} type=raw,value=universe-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -121,7 +112,14 @@ runs: flavor: | latest=auto - - name: Build and Push to Docker Hub + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.token }} + + - name: Build and Push to GitHub Container Registry uses: docker/bake-action@v5 with: push: true diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 9b12b73808..c028eede58 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -11,19 +11,10 @@ inputs: build-args: description: Additional build args. required: false - dockerhub-token: - description: Docker Hub token. - required: true runs: using: composite steps: - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ github.repository_owner }} - password: ${{ inputs.dockerhub-token }} - - name: Install jq and vcstool run: | sudo apt-get -y update @@ -77,7 +68,7 @@ runs: id: meta-core-devel uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=core-devel-${{ inputs.platform }} type=raw,value=core-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -89,7 +80,7 @@ runs: id: meta-universe-sensing-perception-devel uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-sensing-perception-devel-${{ inputs.platform }} type=raw,value=universe-sensing-perception-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -101,7 +92,7 @@ runs: id: meta-universe-sensing-perception uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-sensing-perception-${{ inputs.platform }} type=raw,value=universe-sensing-perception-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -113,7 +104,7 @@ runs: id: meta-universe-localization-mapping-devel uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-localization-mapping-devel-${{ inputs.platform }} type=raw,value=universe-localization-mapping-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -125,7 +116,7 @@ runs: id: meta-universe-localization-mapping uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-localization-mapping-${{ inputs.platform }} type=raw,value=universe-localization-mapping-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -137,7 +128,7 @@ runs: id: meta-universe-planning-control-devel uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-planning-control-devel-${{ inputs.platform }} type=raw,value=universe-planning-control-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -149,7 +140,7 @@ runs: id: meta-universe-planning-control uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-planning-control-${{ inputs.platform }} type=raw,value=universe-planning-control-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -161,7 +152,7 @@ runs: id: meta-universe-vehicle-system-devel uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-vehicle-system-devel-${{ inputs.platform }} type=raw,value=universe-vehicle-system-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -173,7 +164,7 @@ runs: id: meta-universe-vehicle-system uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-vehicle-system-${{ inputs.platform }} type=raw,value=universe-vehicle-system-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -185,7 +176,7 @@ runs: id: meta-universe-devel uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-devel-${{ inputs.platform }} type=raw,value=universe-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -197,7 +188,7 @@ runs: id: meta-universe uses: docker/metadata-action@v5 with: - images: ${{ github.repository_owner }}/${{ inputs.target-image }} + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }} tags: | type=raw,value=universe-${{ inputs.platform }} type=raw,value=universe-${{ steps.date.outputs.date }}-${{ inputs.platform }} @@ -205,7 +196,14 @@ runs: flavor: | latest=auto - - name: Build and Push to Docker Hub + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.token }} + + - name: Build and Push to GitHub Container Registry uses: docker/bake-action@v5 with: push: true diff --git a/.github/actions/docker-build/action.yaml b/.github/actions/docker-build/action.yaml index 03c922d863..d5bda73b4f 100644 --- a/.github/actions/docker-build/action.yaml +++ b/.github/actions/docker-build/action.yaml @@ -15,19 +15,10 @@ inputs: build-args: description: Additional build args. required: false - dockerhub-token: - description: Docker Hub token. - required: true runs: using: composite steps: - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ github.repository_owner }} - password: ${{ inputs.dockerhub-token }} - - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 @@ -102,6 +93,13 @@ runs: } skip-extraction: ${{ steps.cache-ccache.outputs.cache-hit && steps.cache-apt-get.outputs.cache-hit }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.token }} + - name: Run docker build uses: docker/build-push-action@v6 with: @@ -109,4 +107,4 @@ runs: context: . push: false build-args: ${{ inputs.build-args }} - cache-from: type=registry,ref=${{ github.repository }}-buildcache:${{ inputs.platform }}-${{ inputs.cache-tag-suffix }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ inputs.platform }}-${{ inputs.cache-tag-suffix }} diff --git a/.github/workflows/autoware-base.yaml b/.github/workflows/autoware-base.yaml index e8ce6f845c..72daa21e9c 100644 --- a/.github/workflows/autoware-base.yaml +++ b/.github/workflows/autoware-base.yaml @@ -38,4 +38,3 @@ jobs: *.platform=linux/amd64,linux/arm64 *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }} *.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }} - dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index c9cca253a1..b40f735650 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -65,10 +65,9 @@ jobs: *.args.AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }} *.args.AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }} *.args.LIB_DIR=aarch64 - *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.ref_name }} - *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:arm64-main - *.cache-to=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max - dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }} + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-main + *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max - name: Show disk space if: always() @@ -115,10 +114,9 @@ jobs: *.args.AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }} *.args.AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }} *.args.LIB_DIR=aarch64 - *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.ref_name }} - *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:arm64-main - *.cache-to=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max - dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }} + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-main + *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max - name: Show disk space if: always() diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index a6fdb83259..9613facdd4 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -65,10 +65,9 @@ jobs: *.args.AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }} *.args.AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }} *.args.LIB_DIR=x86_64 - *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.ref_name }} - *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-main - *.cache-to=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.ref_name }},mode=max - dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }} + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-main + *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }},mode=max - name: Show disk space if: always() @@ -115,10 +114,9 @@ jobs: *.args.AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }} *.args.AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }} *.args.LIB_DIR=x86_64 - *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.ref_name }} - *.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-main - *.cache-to=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.ref_name }},mode=max - dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }} + *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-main + *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }},mode=max - name: Show disk space if: always() diff --git a/.github/workflows/health-check-arm64.yaml b/.github/workflows/health-check-arm64.yaml index 5bc412c708..acefa7fa3c 100644 --- a/.github/workflows/health-check-arm64.yaml +++ b/.github/workflows/health-check-arm64.yaml @@ -37,7 +37,6 @@ jobs: AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }} AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }} LIB_DIR=aarch64 - dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} - name: Show disk space if: always() diff --git a/.github/workflows/health-check-nightly.yaml b/.github/workflows/health-check-nightly.yaml index 2d9e18f5ff..78351e13eb 100644 --- a/.github/workflows/health-check-nightly.yaml +++ b/.github/workflows/health-check-nightly.yaml @@ -53,7 +53,6 @@ jobs: AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }} AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }} LIB_DIR=x86_64 - dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} - name: Show disk space if: always() diff --git a/.github/workflows/health-check.yaml b/.github/workflows/health-check.yaml index a7640dd70c..829a526441 100644 --- a/.github/workflows/health-check.yaml +++ b/.github/workflows/health-check.yaml @@ -47,7 +47,6 @@ jobs: AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }} AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }} LIB_DIR=x86_64 - dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }} - name: Show disk space if: always()