diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0437aa..771b732 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: backend-artifacts - path: target/o-neko*-layered.jar + path: target/o-neko-*-layered.jar containerize-main: needs: backend @@ -74,7 +74,16 @@ jobs: uses: actions/download-artifact@v4 with: name: backend-artifacts - path: . + + - name: Locate backend JAR + id: find_jar + run: | + jar=$(find . -type f -name '*-layered.jar' -print -quit) + if [ -z "$jar" ]; then + echo "No layered JAR found" >&2 + exit 1 + fi + echo "jar=$jar" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -92,5 +101,4 @@ jobs: push: true tags: subshellgmbh/o-neko:latest-dev build-args: | - JAR_FILE=$(ls *-layered.jar) - + JAR_FILE=${{ steps.find_jar.outputs.jar }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1646a3b..f3d1db0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: backend-artifacts - path: target/o-neko*-layered.jar + path: target/o-neko-*-layered.jar release: needs: backend @@ -70,7 +70,16 @@ jobs: uses: actions/download-artifact@v4 with: name: backend-artifacts - path: . + + - name: Locate backend JAR + id: find_jar + run: | + jar=$(find . -type f -name '*-layered.jar' -print -quit) + if [ -z "$jar" ]; then + echo "No layered JAR found" >&2 + exit 1 + fi + echo "jar=$jar" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -94,4 +103,4 @@ jobs: subshellgmbh/o-neko:latest subshellgmbh/o-neko:${{ steps.tag.outputs.tag }} build-args: | - JAR_FILE=$(ls *-layered.jar) + JAR_FILE=${{ steps.find_jar.outputs.jar }}