diff --git a/.github/actions/ortdocker/action.yml b/.github/actions/ortdocker/action.yml index fe9380c71f029..74d9a2f48d9a5 100644 --- a/.github/actions/ortdocker/action.yml +++ b/.github/actions/ortdocker/action.yml @@ -15,13 +15,13 @@ # SPDX-License-Identifier: Apache-2.0 # License-Filename: LICENSE -name: "ORT Docker Image" -description: "Check and create docker image for Ort components" -author: "Helio Chissini de Castro " +name: "ORT Docker image" +description: "Check and create Docker image for ORT components" +author: "The ORT Project Authors" inputs: registry: - description: "GitHub Container Registry" + description: "GitHub container registry" default: "ghcr.io" token: description: "GitHub token" @@ -61,11 +61,11 @@ runs: echo $result echo "result=$result" >> $GITHUB_OUTPUT - - name: Set up Docker Buildx + - name: Set up Docker build if: steps.check_image.outputs.result != 'found' uses: docker/setup-buildx-action@v2 - - name: Login to GitHub Container Registry + - name: Login to GitHub container registry if: steps.check_image.outputs.result != 'found' uses: docker/login-action@v2 with: @@ -73,7 +73,7 @@ runs: username: ${{ github.actor }} password: ${{ inputs.token }} - - name: Extract components metadata (tags, labels) for base image + - name: Extract components metadata (tags, labels) if: steps.check_image.outputs.result != 'found' id: meta uses: docker/metadata-action@v4 @@ -83,7 +83,7 @@ runs: tags: type=raw,value=${{ inputs.version }} - - name: Build ORT Base container + - name: Build image if: steps.check_image.outputs.result != 'found' uses: docker/build-push-action@v4 with: diff --git a/.github/actions/ortdocker/check_image.py b/.github/actions/ortdocker/check_image.py index 98846b0671d93..31af107f11752 100644 --- a/.github/actions/ortdocker/check_image.py +++ b/.github/actions/ortdocker/check_image.py @@ -19,6 +19,10 @@ import requests +""" Use current GitHub API to check if a container image with the + given name and version exists. +""" + token = os.getenv("INPUT_TOKEN") org = os.getenv("GITHUB_REPOSITORY_OWNER") name = os.getenv("INPUT_NAME") diff --git a/.github/workflows/docker-ort-runtime-ext.yml b/.github/workflows/docker-ort-runtime-ext.yml index 1b8e68567af52..c78711cd8e765 100644 --- a/.github/workflows/docker-ort-runtime-ext.yml +++ b/.github/workflows/docker-ort-runtime-ext.yml @@ -15,7 +15,7 @@ # SPDX-License-Identifier: Apache-2.0 # License-Filename: LICENSE -name: MegaDocker Extended Image +name: Mega Docker extended image on: workflow_dispatch: @@ -31,7 +31,7 @@ on: - '*' workflow_run: workflows: - - 'MegaDocker Runtime Image' + - 'Mega Docker runtime image' types: - completed @@ -42,7 +42,7 @@ permissions: write-all jobs: android_image: - name: Android Image + name: Android image runs-on: ubuntu-22.04 steps: - name: Checkout default branch @@ -50,7 +50,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Android Image + - name: Build Android image uses: ./.github/actions/ortdocker with: name: android @@ -60,7 +60,7 @@ jobs: ANDROID_CMD_VERSION=${{ env.ANDROID_CMD_VERSION }} dart_image: - name: Dart Image + name: Dart image runs-on: ubuntu-22.04 steps: - name: Checkout default branch @@ -68,7 +68,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Dart Image + - name: Build Dart image uses: ./.github/actions/ortdocker with: name: dart @@ -78,7 +78,7 @@ jobs: DART_VERSION=${{ env.DART_VERSION }} dotnet_image: - name: Dotnet Image + name: Dotnet image runs-on: ubuntu-22.04 steps: - name: Checkout default branch @@ -86,7 +86,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Dotnet Image + - name: Build Dotnet image uses: ./.github/actions/ortdocker with: name: dotnet @@ -97,7 +97,7 @@ jobs: NUGET_INSPECTOR_VERSION=${{ env.NUGET_INSPECTOR_VERSION }} haskell_image: - name: Haskell Image + name: Haskell image runs-on: ubuntu-22.04 steps: - name: Checkout default branch @@ -105,7 +105,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Haskell Image + - name: Build Haskell image uses: ./.github/actions/ortdocker with: name: haskell @@ -115,7 +115,7 @@ jobs: HASKELL_STACK_VERSION=${{ env.HASKELL_STACK_VERSION }} scala_image: - name: Scala Image + name: Scala image runs-on: ubuntu-22.04 steps: - name: Checkout default branch @@ -123,7 +123,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Scala Image + - name: Build Scala image uses: ./.github/actions/ortdocker with: name: scala @@ -133,7 +133,7 @@ jobs: SBT_VERSION=${{ env.SBT_VERSION }} swift_image: - name: Swift Image + name: Swift image runs-on: ubuntu-22.04 steps: - name: Checkout default branch @@ -141,7 +141,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Swift Image + - name: Build Swift image uses: ./.github/actions/ortdocker with: name: swift @@ -152,7 +152,7 @@ jobs: runtime_extended_image: if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} - name: Build ORT Extended Image + name: Build ORT extended image needs: [ android_image, dart_image, dotnet_image, haskell_image, scala_image, swift_image ] runs-on: ubuntu-22.04 permissions: @@ -163,17 +163,17 @@ jobs: - name: Checkout default branch uses: actions/checkout@v3 - - name: Set up Docker Buildx + - name: Set up Docker build uses: docker/setup-buildx-action@v2 - - name: Login to GitHub Container Registry + - name: Login to GitHub container registry uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract components metadata (tags, labels) for Ort runtime image + - name: Extract components metadata (tags, labels) id: meta-ort uses: docker/metadata-action@v4 with: @@ -182,7 +182,7 @@ jobs: tags: | type=raw,sha,enable=true,format=short - - name: Build ORT runtime container + - name: Build ORT extended runtime image uses: docker/build-push-action@v4 with: context: . diff --git a/.github/workflows/docker-ort-runtime.yml b/.github/workflows/docker-ort-runtime.yml index f467e7d46dd01..ef800a2a64f89 100644 --- a/.github/workflows/docker-ort-runtime.yml +++ b/.github/workflows/docker-ort-runtime.yml @@ -15,7 +15,7 @@ # SPDX-License-Identifier: Apache-2.0 # License-Filename: LICENSE -name: MegaDocker Runtime Image +name: Mega Docker runtime image on: workflow_dispatch: @@ -36,7 +36,7 @@ permissions: write-all jobs: base_image: - name: Base Image + name: Base image runs-on: ubuntu-22.04 steps: - name: Checkout default branch @@ -44,7 +44,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Base Image + - name: Build base image uses: ./.github/actions/ortdocker with: name: base @@ -55,7 +55,7 @@ jobs: UBUNTU_VERSION=${{ env.UBUNTU_VERSION }} nodejs_image: - name: NodeJS Image + name: NodeJS image needs: [base_image] runs-on: ubuntu-22.04 steps: @@ -64,7 +64,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build NodeJS Image + - name: Build NodeJS image uses: ./.github/actions/ortdocker with: name: nodejs @@ -77,7 +77,7 @@ jobs: YARN_VERSION=${{ env.YARN_VERSION }} python_image: - name: Python Image + name: Python image needs: [base_image] runs-on: ubuntu-22.04 steps: @@ -86,7 +86,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Python Image + - name: Build Python image uses: ./.github/actions/ortdocker with: name: python @@ -103,7 +103,7 @@ jobs: SCANCODE_VERSION=${{ env.SCANCODE_VERSION }} rust_image: - name: Rust Image + name: Rust image needs: [base_image] runs-on: ubuntu-22.04 steps: @@ -112,7 +112,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Rust Image + - name: Build Rust image uses: ./.github/actions/ortdocker with: name: rust @@ -122,7 +122,7 @@ jobs: RUST_VERSION=${{ env.RUST_VERSION }} ruby_image: - name: Ruby Image + name: Ruby image needs: [base_image] runs-on: ubuntu-22.04 steps: @@ -131,7 +131,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Ruby Image + - name: Build Ruby image uses: ./.github/actions/ortdocker with: name: ruby @@ -142,7 +142,7 @@ jobs: COCOAPODS_VERSION=${{ env.COCOAPODS_VERSION }} golang_image: - name: Golang Image + name: Golang image needs: [base_image] runs-on: ubuntu-22.04 steps: @@ -151,7 +151,7 @@ jobs: - name: Set environment variables run: | cat .versions >> $GITHUB_ENV - - name: Build Golang Image + - name: Build Golang image uses: ./.github/actions/ortdocker with: name: golang @@ -163,7 +163,7 @@ jobs: runtime_image: needs: [base_image, nodejs_image, python_image, rust_image, ruby_image, golang_image] - name: Build ORT runtime Image + name: Build ORT runtime image runs-on: ubuntu-22.04 permissions: contents: read @@ -177,17 +177,17 @@ jobs: run: | cat .versions >> $GITHUB_ENV - - name: Set up Docker Buildx + - name: Set up Docker build uses: docker/setup-buildx-action@v2 - - name: Login to GitHub Container Registry + - name: Login to GitHub container registry uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract components metadata (tags, labels) for Ort runtime image + - name: Extract components metadata (tags, labels) id: meta-ort uses: docker/metadata-action@v4 with: @@ -196,7 +196,7 @@ jobs: tags: | type=raw,sha,enable=true,format=short - - name: Build ORT runtime container + - name: Build ORT runtime image if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} uses: docker/build-push-action@v4 with: diff --git a/Dockerfile b/Dockerfile index a98de4635e182..92b323de6e21f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -103,8 +103,8 @@ COPY "$CRT_FILES" /tmp/certificates/ RUN /etc/scripts/export_proxy_certificates.sh /tmp/certificates/ \ && /etc/scripts/import_certificates.sh /tmp/certificates/ -# Add syft to use as primary spdx docker scanner -# Create docs dir to store future spdxs +# Add Syft to use as primary SPDX Docker scanner +# Create docs dir to store future SPDX files RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sudo sh -s -- -b /usr/local/bin \ && mkdir -p /usr/share/doc/ort \ && chown $USER:$USER /usr/share/doc/ort @@ -434,7 +434,7 @@ FROM base as run # Remove ort build scripts RUN [ -d /etc/scripts ] && sudo rm -rf /etc/scripts -# Minor requirements +# Install optional tool subversion for ORT analyzer RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ sudo apt-get update && \