|
29 | 29 |
|
30 | 30 | jobs: |
31 | 31 | build: |
32 | | - runs-on: ubuntu-latest |
33 | | - |
34 | | - steps: |
35 | | - - name: Checkout repository |
36 | | - # This step checks out the current repository source code |
37 | | - uses: actions/checkout@v4 |
38 | | - |
39 | | - - name: Setup Java, dependencies and Maven cache |
40 | | - # This step sets up JDK, clones and optionally compiles dependencies, |
41 | | - # and configures the Maven cache for the whole job. |
42 | | - id: setup_java_maven |
43 | | - uses: opencb/ci-core/.github/actions/setup-java-maven@main |
44 | | - with: |
45 | | - java_version: ${{ inputs.java_version }} |
46 | | - storage_hadoop: ${{ inputs.hadoop_flavour || vars.HADOOP_FLAVOUR }} |
47 | | - dependency_repos: ${{ inputs.dependency_repos }} |
48 | | - |
49 | | - - name: Maven Build (skip tests) |
50 | | - # This step performs the main Maven build using the configured options. |
51 | | - run: mvn -T 2 clean install -DskipTests ${{ inputs.maven_opts }} --no-transfer-progress |
52 | | - |
53 | | - - name: Upload build artifacts |
54 | | - # This step uploads the build artifacts if requested by the caller. |
55 | | - if: ${{ inputs.upload_artifact == true }} |
56 | | - uses: actions/upload-artifact@v4 |
57 | | - with: |
58 | | - name: ${{ inputs.build_folder }} |
59 | | - path: build |
60 | | - |
61 | | - - name: Get project version |
62 | | - id: get_project_version |
63 | | - |
64 | | - # This step extracts the Maven project version and exposes it as an output. |
65 | | - run: | |
66 | | - echo "version=$(mvn help:evaluate -q -Dexpression=project.version -DforceStdout)" >> "$GITHUB_OUTPUT" |
67 | | - - name: Build summary |
68 | | - # This step writes a small summary into the GitHub job summary, so it is |
69 | | - # easy to inspect which dependencies_sha and cache key were used. |
70 | | - shell: bash |
71 | | - run: | |
72 | | - { |
73 | | - echo "## Java / Build summary" |
74 | | - echo "" |
75 | | - echo "- Build version: \`${{ steps.get_project_version.outputs.version}}\`" |
76 | | - echo "- Hadoop flavour: \`${{ inputs.storage_hadoop }}\`" |
77 | | - } >> "$GITHUB_STEP_SUMMARY" |
| 32 | + uses: opencb/ci-core/./.github/workflows/build.yml |
| 33 | + with: |
| 34 | + maven_opts: ${{ inputs.maven_opts }} |
| 35 | + build_folder: ${{ inputs.build_folder }} |
| 36 | + upload_artifact: ${{ inputs.upload_artifact }} |
| 37 | + java_version: ${{ inputs.java_version }} |
| 38 | + storage_hadoop: ${{ inputs.storage_hadoop }} |
| 39 | + dependency_repos: ${{ inputs.dependency_repos }} |
78 | 40 |
|
0 commit comments