Skip to content
5 changes: 5 additions & 0 deletions .github/workflows/builder_maven_slsa3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ on:
required: false
default: 17
type: number
directory:
description: "Sub-directory to launch the build from. Must be under the workspace. Relative from the root of the file directory when invoking the builder. Should not include a '/' at the end."
required: false
type: string
default: "."

outputs:
provenance-name:
Expand Down
5 changes: 5 additions & 0 deletions internal/builders/maven/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,17 @@ runs:
shell: bash
env:
SLSA_OUTPUTS_ARTIFACTS_FILE: ${{ inputs.slsa-layout-file }}
PROJECT_ROOT: ${{ fromJson(inputs.slsa-workflow-inputs).directory }}
run: |
gh_root_dir=$(pwd)
mv ./__BUILDER_CHECKOUT_DIR__ ../__BUILDER_CHECKOUT_DIR__ \
&& cd ../__BUILDER_CHECKOUT_DIR__/actions/maven/publish/slsa-hashing-plugin \
&& mvn clean install \
&& cd - \
&& cd "${PROJECT_ROOT}" \
&& mvn package -Drun.hash.jarfile=true
mv $(dirname ${SLSA_OUTPUTS_ARTIFACTS_FILE}) "${gh_root_dir}/../"
mv target "${gh_root_dir}/"
- name: Upload target
id: upload-target
uses: slsa-framework/slsa-github-generator/.github/actions/secure-upload-folder@main
Expand Down