Skip to content

Commit

Permalink
revert to ghcr (#127)
Browse files Browse the repository at this point in the history
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
  • Loading branch information
youtalk authored Nov 11, 2024
1 parent 8be21c1 commit a151e80
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 50 deletions.
16 changes: 7 additions & 9 deletions .github/actions/docker-build-and-push-cuda/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ inputs:
build-args:
description: ""
required: false
dockerhub-token:
description: ""
required: true

runs:
using: composite
Expand Down Expand Up @@ -58,7 +55,7 @@ runs:
id: meta-universe-sensing-perception-devel-cuda
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
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 }}
Expand All @@ -70,7 +67,7 @@ runs:
id: meta-universe-sensing-perception-cuda
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-sensing-perception-cuda-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -82,7 +79,7 @@ runs:
id: meta-universe-devel-cuda
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-devel-cuda-${{ inputs.platform }}
type=raw,value=universe-devel-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -94,19 +91,20 @@ runs:
id: meta-universe-cuda
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-cuda-${{ inputs.platform }}
type=raw,value=universe-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-cuda
flavor: |
latest=auto
- name: Login to Docker Hub
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ inputs.dockerhub-token }}
password: ${{ github.token }}

- name: Build and Push to GitHub Container Registry
uses: docker/bake-action@v5
Expand Down
32 changes: 15 additions & 17 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ inputs:
build-args:
description: ""
required: false
dockerhub-token:
description: ""
required: true

runs:
using: composite
Expand Down Expand Up @@ -71,7 +68,7 @@ runs:
id: meta-base
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=base-${{ inputs.platform }}
type=raw,value=base-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -83,7 +80,7 @@ runs:
id: meta-core-devel
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=core-devel-${{ inputs.platform }}
type=raw,value=core-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -95,7 +92,7 @@ runs:
id: meta-universe-sensing-perception-devel
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-sensing-perception-devel-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -107,7 +104,7 @@ runs:
id: meta-universe-sensing-perception
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-sensing-perception-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -119,7 +116,7 @@ runs:
id: meta-universe-localization-mapping-devel
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-localization-mapping-devel-${{ inputs.platform }}
type=raw,value=universe-localization-mapping-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -131,7 +128,7 @@ runs:
id: meta-universe-localization-mapping
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-localization-mapping-${{ inputs.platform }}
type=raw,value=universe-localization-mapping-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -143,7 +140,7 @@ runs:
id: meta-universe-planning-control-devel
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-planning-control-devel-${{ inputs.platform }}
type=raw,value=universe-planning-control-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -155,7 +152,7 @@ runs:
id: meta-universe-planning-control
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-planning-control-${{ inputs.platform }}
type=raw,value=universe-planning-control-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -167,7 +164,7 @@ runs:
id: meta-universe-vehicle-system-devel
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-vehicle-system-devel-${{ inputs.platform }}
type=raw,value=universe-vehicle-system-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -179,7 +176,7 @@ runs:
id: meta-universe-vehicle-system
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-vehicle-system-${{ inputs.platform }}
type=raw,value=universe-vehicle-system-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -191,7 +188,7 @@ runs:
id: meta-universe-devel
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-devel-${{ inputs.platform }}
type=raw,value=universe-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
Expand All @@ -203,19 +200,20 @@ runs:
id: meta-universe
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-${{ inputs.platform }}
type=raw,value=universe-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe
flavor: |
latest=auto
- name: Login to Docker Hub
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ inputs.dockerhub-token }}
password: ${{ github.token }}

- name: Build and Push to GitHub Container Registry
uses: docker/bake-action@v5
Expand Down
10 changes: 4 additions & 6 deletions .github/actions/docker-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ inputs:
build-args:
description: ""
required: true
dockerhub-token:
description: ""
required: true

runs:
using: composite
Expand Down Expand Up @@ -86,11 +83,12 @@ runs:
}
skip-extraction: ${{ steps.cache-ccache.outputs.cache-hit && steps.cache-apt-get.outputs.cache-hit }}

- name: Login to Docker Hub
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ inputs.dockerhub-token }}
password: ${{ github.token }}

- name: Run docker build
uses: docker/build-push-action@v6
Expand All @@ -99,4 +97,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 }}
14 changes: 6 additions & 8 deletions .github/workflows/docker-build-and-push-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ jobs:
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
*.args.LIB_DIR=aarch64
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.head_ref }}
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:arm64-main
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.head_ref }},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: Build 'Autoware' with CUDA
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
Expand All @@ -81,10 +80,9 @@ jobs:
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
*.args.LIB_DIR=aarch64
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.head_ref }}
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:arm64-main
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:arm64-${{ github.head_ref }},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()
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/docker-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ jobs:
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
*.args.LIB_DIR=x86_64
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.head_ref }}
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-main
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.head_ref }},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: Build 'Autoware' with CUDA
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
Expand All @@ -81,10 +80,9 @@ jobs:
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
*.args.LIB_DIR=x86_64
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.head_ref }}
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-main
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:amd64-${{ github.head_ref }},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()
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/health-check-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
LIB_DIR=aarch64
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Show disk space
if: always()
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/health-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
LIB_DIR=x86_64
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Show disk space
if: always()
Expand Down

0 comments on commit a151e80

Please sign in to comment.