Skip to content

Commit c7a9da3

Browse files
author
Patrick Schwager
committed
readd docker build
1 parent 0f40c68 commit c7a9da3

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

.github/workflows/ci-main.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,24 @@ jobs:
2222
signing-key-password: ${{ secrets.GPG_PASSPHRASE }}
2323
registry-username: ${{ github.actor }}
2424
registry-password: ${{ secrets.GITHUB_TOKEN }}
25+
publish:
26+
needs: CI
27+
runs-on: ubuntu-latest
28+
permissions:
29+
contents: read
30+
packages: write
31+
steps:
32+
- name: Log in to GitHub Container Registry
33+
uses: docker/login-action@v2
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
- name: Build and Push Docker images
39+
run: |
40+
modules=("weather-agent news-agent productsearch-agent techspec-agent reportgenerate-agent")
41+
version=$(grep '^version=' $module/gradle.properties | awk -F= '{print $2}')
42+
for module in "${modules[@]}"; do
43+
docker build --build-arg VERSION=$version -f $module/Dockerfile -t ghcr.io/eclipse-lmos/$module:$version $module
44+
docker push ghcr.io/eclipse-lmos/$module:$version
45+
done

.github/workflows/release.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,28 @@ jobs:
2727
signing-key-id: ${{ secrets.GPG_SUBKEY_ID }}
2828
signing-key: ${{ secrets.GPG_PRIVATE_KEY }}
2929
signing-key-password: ${{ secrets.GPG_PASSPHRASE }}
30+
registry-username: ${{ github.actor }}
31+
registry-password: ${{ secrets.GITHUB_TOKEN }}
3032
with:
31-
release-type: ${{ github.event.inputs.release-type }}
33+
release-type: ${{ github.event.inputs.release-type }}
34+
publish:
35+
needs: CI
36+
runs-on: ubuntu-latest
37+
permissions:
38+
contents: read
39+
packages: write
40+
steps:
41+
- name: Log in to GitHub Container Registry
42+
uses: docker/login-action@v2
43+
with:
44+
registry: ghcr.io
45+
username: ${{ github.actor }}
46+
password: ${{ secrets.GITHUB_TOKEN }}
47+
- name: Build and Push Docker images
48+
run: |
49+
modules=("weather-agent news-agent productsearch-agent techspec-agent reportgenerate-agent")
50+
version=$(grep '^version=' $module/gradle.properties | awk -F= '{print $2}')
51+
for module in "${modules[@]}"; do
52+
docker build --build-arg VERSION=$version -f $module/Dockerfile -t ghcr.io/eclipse-lmos/$module:$version $module
53+
docker push ghcr.io/eclipse-lmos/$module:$version
54+
done

buildSrc/src/main/kotlin/multimodule-config.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,6 @@ tasks.register("helmPush") {
204204
}
205205

206206
tasks.named("publish") {
207-
dependsOn(tasks.named<BootBuildImage>("bootBuildImage"))
207+
// TODO: dependsOn(tasks.named<BootBuildImage>("bootBuildImage"))
208208
dependsOn(tasks.named("helmPush"))
209209
}

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// SPDX-License-Identifier: Apache-2.0
44

55
rootProject.name = "lmos-sample-agents"
6-
include("weather-agent", "news-agent", "productsearch-agent", "techspec-agent")
6+
include("weather-agent", "news-agent", "productsearch-agent", "techspec-agent","reportgenerate-agent")

0 commit comments

Comments
 (0)