Skip to content

Commit 20aae26

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

File tree

4 files changed

+54
-3
lines changed

4 files changed

+54
-3
lines changed

.github/workflows/ci-main.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,27 @@ 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+
- uses: actions/checkout@v4
33+
- name: Log in to GitHub Container Registry
34+
uses: docker/login-action@v2
35+
with:
36+
registry: ghcr.io
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
39+
- name: Build and Push Docker images
40+
run: |
41+
./gradlew build
42+
modules=("weather-agent" "news-agent" "productsearch-agent" "techspec-agent" "reportgenerate-agent")
43+
version=$(grep '^version=' gradle.properties | awk -F= '{print $2}')
44+
set -x
45+
for module in "${modules[@]}"; do
46+
docker build --build-arg VERSION=$version -f $module/Dockerfile -t ghcr.io/eclipse-lmos/$module:$version $module
47+
docker push ghcr.io/eclipse-lmos/$module:$version
48+
done

.github/workflows/release.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,32 @@ 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+
- uses: actions/checkout@v4
42+
with:
43+
ref: ${{ needs.CI.outputs.version }}
44+
- name: Log in to GitHub Container Registry
45+
uses: docker/login-action@v2
46+
with:
47+
registry: ghcr.io
48+
username: ${{ github.actor }}
49+
password: ${{ secrets.GITHUB_TOKEN }}
50+
- name: Build and Push Docker images
51+
run: |
52+
./gradlew build
53+
modules=("weather-agent" "news-agent" "productsearch-agent" "techspec-agent" "reportgenerate-agent")
54+
version=$(grep '^version=' gradle.properties | awk -F= '{print $2}')
55+
for module in "${modules[@]}"; do
56+
docker build --build-arg VERSION=$version -f $module/Dockerfile -t ghcr.io/eclipse-lmos/$module:$version $module
57+
docker push ghcr.io/eclipse-lmos/$module:$version
58+
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)