-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yml
More file actions
37 lines (35 loc) · 1.71 KB
/
Copy pathaction.yml
File metadata and controls
37 lines (35 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: "Restore the built server"
description: "Downloads the packaged reactor into server/ and installs its generated-clients JAR, so Maven goals run against the built classes instead of compiling again."
inputs:
artifact:
description: "Name of the reactor artifact uploaded by the package job"
required: true
outputs:
executable-jar:
description: "Absolute path of the executable application JAR"
value: ${{ steps.locate.outputs.executable-jar }}
runs:
using: "composite"
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ inputs.artifact }}
path: server
- name: Install the generated clients and locate the executable JAR
id: locate
shell: bash
working-directory: server
run: |
set -euo pipefail
test -d application/target/classes
test -d application/target/test-classes
mapfile -t jars < <(find application/target -maxdepth 1 -name 'hephaestus-application-*.jar')
mapfile -t clients < <(find generated-clients/target -maxdepth 1 -name 'hephaestus-generated-clients-*.jar')
(( ${#jars[@]} == 1 )) && (( ${#clients[@]} == 1 ))
# Single-module goals resolve the sibling from the local repository, not from the reactor;
# reading its descriptor needs the parent pom there too.
./mvnw --batch-mode --quiet -Dmaven.build.cache.enabled=false install:install-file \
-Dfile=pom.xml -DpomFile=pom.xml -Dpackaging=pom
./mvnw --batch-mode --quiet -Dmaven.build.cache.enabled=false install:install-file \
-Dfile="${clients[0]}" -DpomFile=generated-clients/pom.xml
echo "executable-jar=$PWD/${jars[0]}" >> "$GITHUB_OUTPUT"