Skip to content

Commit e7f2ad4

Browse files
authored
fix the container build (#385)
1 parent 261fc6b commit e7f2ad4

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
uses: actions/upload-artifact@v4
6262
with:
6363
name: backend-artifacts
64-
path: target/o-neko*-layered.jar
64+
path: target/o-neko-*-layered.jar
6565

6666
containerize-main:
6767
needs: backend
@@ -74,7 +74,16 @@ jobs:
7474
uses: actions/download-artifact@v4
7575
with:
7676
name: backend-artifacts
77-
path: .
77+
78+
- name: Locate backend JAR
79+
id: find_jar
80+
run: |
81+
jar=$(find . -type f -name '*-layered.jar' -print -quit)
82+
if [ -z "$jar" ]; then
83+
echo "No layered JAR found" >&2
84+
exit 1
85+
fi
86+
echo "jar=$jar" >> $GITHUB_OUTPUT
7887
7988
- name: Set up Docker Buildx
8089
uses: docker/setup-buildx-action@v3
@@ -92,5 +101,4 @@ jobs:
92101
push: true
93102
tags: subshellgmbh/o-neko:latest-dev
94103
build-args: |
95-
JAR_FILE=$(ls *-layered.jar)
96-
104+
JAR_FILE=${{ steps.find_jar.outputs.jar }}

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
uses: actions/upload-artifact@v4
5959
with:
6060
name: backend-artifacts
61-
path: target/o-neko*-layered.jar
61+
path: target/o-neko-*-layered.jar
6262

6363
release:
6464
needs: backend
@@ -70,7 +70,16 @@ jobs:
7070
uses: actions/download-artifact@v4
7171
with:
7272
name: backend-artifacts
73-
path: .
73+
74+
- name: Locate backend JAR
75+
id: find_jar
76+
run: |
77+
jar=$(find . -type f -name '*-layered.jar' -print -quit)
78+
if [ -z "$jar" ]; then
79+
echo "No layered JAR found" >&2
80+
exit 1
81+
fi
82+
echo "jar=$jar" >> $GITHUB_OUTPUT
7483
7584
- name: Set up Docker Buildx
7685
uses: docker/setup-buildx-action@v3
@@ -94,4 +103,4 @@ jobs:
94103
subshellgmbh/o-neko:latest
95104
subshellgmbh/o-neko:${{ steps.tag.outputs.tag }}
96105
build-args: |
97-
JAR_FILE=$(ls *-layered.jar)
106+
JAR_FILE=${{ steps.find_jar.outputs.jar }}

0 commit comments

Comments
 (0)