Skip to content

Commit f55ca2e

Browse files
heliocastrotsteenbe
authored andcommitted
feat(docker): Provide extended image with all components
Signed-off-by: Helio Chissini de Castro <[email protected]>
1 parent 19a5ee2 commit f55ca2e

15 files changed

+215
-23
lines changed

.github/workflows/docker-ort-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
branches:
2828
- main
2929
workflow_run:
30-
workflows: ["Base Image"]
30+
workflows: ["Runtime Image"]
3131
types:
3232
- completed
3333

.github/workflows/docker-ort-dart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
- '.ortversions/dart.versions'
2828
- '.github/workflows/docker-ort-base.yml'
2929
workflow_run:
30-
workflows: ["Base Image"]
30+
workflows: ["Scale Image"]
3131
types:
3232
- completed
3333

.github/workflows/docker-ort-dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
- '.ortversions/dotnet.versions'
2828
- '.github/workflows/docker-ort-base.yml'
2929
workflow_run:
30-
workflows: ["Base Image"]
30+
workflows: ["Dart Image"]
3131

3232
env:
3333
REGISTRY: ghcr.io

.github/workflows/docker-ort-golang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
- '.ortversions/golang.versions'
2828
- '.github/workflows/docker-ort-base.yml'
2929
workflow_run:
30-
workflows: ["Base Image"]
30+
workflows: ["Ruby Image"]
3131
types:
3232
- completed
3333

.github/workflows/docker-ort-haskell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
- '.ortversions/haskell.versions'
2828
- '.github/workflows/docker-ort-base.yml'
2929
workflow_run:
30-
workflows: ["Base Image"]
30+
workflows: ["Dotnet Image"]
3131
types:
3232
- completed
3333

.github/workflows/docker-ort-nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727
- '.ortversions/nodejs.versions'
2828
- '.github/workflows/docker-ort-base.yml'
2929
workflow_run:
30-
workflows: ["Base Image"]
30+
workflows: ["Python Image"]
3131
types:
3232
- completed
3333

.github/workflows/docker-ort-ruby.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ on:
2727
- '.ortversions/ruby.versions'
2828
- '.github/workflows/docker-ort-base.yml'
2929
workflow_run:
30-
workflows: ["Base Image"]
31-
30+
workflows: ["Rust Image"]
31+
types:
32+
- completed
3233

3334
env:
3435
REGISTRY: ghcr.io
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Copyright (C) 2023 The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>)
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
# License-Filename: LICENSE
17+
18+
name: Extended Image
19+
20+
on:
21+
workflow_dispatch:
22+
pull_request:
23+
branches:
24+
- main
25+
push:
26+
branches:
27+
- main
28+
workflow_run:
29+
workflows:
30+
- 'Haskell Image'
31+
types:
32+
- completed
33+
34+
env:
35+
REGISTRY: ghcr.io
36+
37+
permissions: write-all
38+
39+
jobs:
40+
build:
41+
name: Build ORT Extended Image
42+
runs-on: ubuntu-22.04
43+
permissions:
44+
contents: read
45+
packages: write
46+
47+
steps:
48+
- name: Checkout default branch
49+
uses: actions/checkout@v3
50+
51+
- name: Set up Docker Buildx
52+
uses: docker/setup-buildx-action@v2
53+
54+
- name: Login to GitHub Container Registry
55+
uses: docker/login-action@v2
56+
with:
57+
registry: ${{ env.REGISTRY }}
58+
username: ${{ github.actor }}
59+
password: ${{ secrets.GITHUB_TOKEN }}
60+
61+
- name: Extract components metadata (tags, labels) for Ort runtime image
62+
id: meta-ort
63+
uses: docker/metadata-action@v4
64+
with:
65+
images: |
66+
${{ env.REGISTRY }}/${{ github.repository_owner }}/ort-extended
67+
tags: |
68+
type=raw,sha,enable=true,format=short
69+
70+
- name: Build ORT runtime container
71+
uses: docker/build-push-action@v4
72+
with:
73+
context: .
74+
file: Dockerfile-extended
75+
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
76+
load: false
77+
tags: |
78+
${{ steps.meta-ort.outputs.tags }}
79+
${{ env.REGISTRY }}/${{ github.repository_owner }}/ort-extended:latest
80+
labels: ${{ steps.meta.outputs.labels }}
81+
build-contexts: |
82+
android=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/android:latest
83+
swift=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/swift:latest
84+
sbt=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/sbt:latest
85+
dart=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/dart:latest
86+
dotnet=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/dotnet:latest
87+
haskell=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/haskell:latest
88+
dotnet=docker-image://${{ env.REGISTRY }}/${{ github.repository }}/dotnet:latest

.github/workflows/docker-ort-runtime.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ on:
2727
- main
2828
workflow_run:
2929
workflows:
30-
- 'Python Image'
31-
- 'NodeJS Image'
32-
- 'Ruby Image'
33-
- 'Rust Image'
3430
- 'Golang Image'
3531
types:
3632
- completed

.github/workflows/docker-ort-rust.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ on:
2727
- '.ortversions/rust.versions'
2828
- '.github/workflows/docker-ort-base.yml'
2929
workflow_run:
30-
workflows: ["Base Image"]
30+
workflows: ["NodeJS Image"]
31+
types:
32+
- completed
3133

3234
env:
3335
REGISTRY: ghcr.io

0 commit comments

Comments
 (0)