-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): Provide extended image with all components
Signed-off-by: Helio Chissini de Castro <heliocastro@gmail.com>
- Loading branch information
1 parent
2fbc559
commit e5ad366
Showing
2 changed files
with
102 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Copyright (C) 2023 The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# License-Filename: LICENSE | ||
|
||
name: Extended Image | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
workflow_run: | ||
workflows: | ||
- 'Android Image' | ||
- 'Dart Image' | ||
- 'Dotnet Image' | ||
- 'Haskell Image' | ||
- 'Runtime Image' | ||
- 'Scala Image' | ||
- 'Swift Image' | ||
|
||
types: | ||
- completed | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
build: | ||
name: Build ORT Extended Image | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout default branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- 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 | ||
id: meta-ort | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ env.REGISTRY }}/${{ github.repository_owner }}/ort-extended | ||
tags: | | ||
type=raw,sha,enable=true,format=short | ||
- name: Build ORT runtime container | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
file: Dockerfile-extended | ||
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | ||
load: false | ||
tags: | | ||
${{ steps.meta-ort.outputs.tags }} | ||
${{ env.REGISTRY }}/${{ github.repository_owner }}/ort-extended:latest | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-contexts: | | ||
android=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/android:latest | ||
swift=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/swift:latest | ||
sbt=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/sbt:latest | ||
dart=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/dart:latest | ||
dotnet=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/dotnet:latest | ||
haskell=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/haskell:latest | ||
dotnet=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/dotnet:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters