Skip to content

Commit

Permalink
chore: fix wrong output in gradle builder (#2646)
Browse files Browse the repository at this point in the history
Fixes slsa-framework/example-package#274

cc @laurentsimon

Signed-off-by: AdamKorcz <adam@adalogics.com>
  • Loading branch information
AdamKorcz authored Aug 18, 2023
1 parent 180a89c commit da5bdc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/builders/gradle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ runs:
- name: Setup Gradle
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2.7.0
- name: Run gradle builder
id: run_gradle_builder
shell: bash
env:
UNTRUSTED_PROJECT_ROOT: ${{ fromJson(inputs.slsa-workflow-inputs).directory }}
Expand Down Expand Up @@ -93,26 +94,25 @@ runs:
&& ./gradlew build -x test
- name: Put release artifacts in one directory
id: collect_release_artifacts
shell: bash
env:
SLSA_OUTPUTS_ARTIFACTS_FILE: ${{ inputs.slsa-layout-file }}
UNTRUSTED_ARTIFACT_LIST: ${{ fromJson(inputs.slsa-workflow-inputs).artifact-list }}
PROJECT_ROOT: ${{ steps.collect_release_artifacts.outputs.validated_project_root }}
PROJECT_ROOT: ${{ steps.run_gradle_builder.outputs.validated_project_root }}
run: |
cd "${PROJECT_ROOT}" && "${GITHUB_WORKSPACE}"/../__TOOL_ACTION_DIR__/collect_release_artifacts.sh
- name: Make outputs
id: make-outputs
shell: bash
env:
SLSA_OUTPUTS_ARTIFACTS_FILE: ${{ inputs.slsa-layout-file }}
PROJECT_ROOT: ${{ steps.collect_release_artifacts.outputs.validated_project_root }}
PROJECT_ROOT: ${{ steps.run_gradle_builder.outputs.validated_project_root }}
run: |
cd "${PROJECT_ROOT}" && "${GITHUB_WORKSPACE}"/../__TOOL_ACTION_DIR__/create_attestation.sh
- name: Move build dir to avoid making it a sub-dir when uploading
shell: bash
env:
PROJECT_ROOT: ${{ steps.collect_release_artifacts.outputs.validated_project_root }}
PROJECT_ROOT: ${{ steps.run_gradle_builder.outputs.validated_project_root }}
run: |
mv "${PROJECT_ROOT}"/build "${GITHUB_WORKSPACE}"/
- name: Upload build dir
Expand Down

0 comments on commit da5bdc7

Please sign in to comment.