@@ -28,25 +28,40 @@ jobs:
2828 with :
2929 repository : open-component-model/ocm
3030 ref : main
31- # Download OCM CLI from GH release assets
32- - name : Install OCM CLI
33- uses : open-component-model/ocm-setup-action@main
34- with :
35- version : v${{ github.event.inputs.OCM_VERSION }}
3631
3732 # Download CTF from GH release assets
38- - name : Download CTF and OCM CLI
33+ - name : Download CTF
3934 run : |
4035 if [ -z "${{ github.event.inputs.OCM_VERSION }}" ]; then
4136 echo "Error: OCM_VERSION parameter is required"
4237 exit 1
4338 fi
4439
45- # Download CTF
4640 CTF_URL="https://github.com/open-component-model/ocm/releases/download/v${{ github.event.inputs.OCM_VERSION }}/ocm-${{ github.event.inputs.OCM_VERSION }}-ctf.tgz"
4741 echo "Downloading CTF from: $CTF_URL"
42+
4843 mkdir -p "${{ github.workspace }}/gen"
49- curl -sS -L -o "${{ github.workspace }}/gen/ctf-aggregated" "$CTF_URL"
44+ curl -L -o "${{ github.workspace }}/gen/ctf-aggregated" "$CTF_URL"
45+
46+ # Since OCM cli is required to download CVs from CTF, extract binary from CTF
47+ - name : Extract OCM Binary from CTF
48+ id : extract-ocm
49+ run : |
50+ ocm_binary="$(bash ./hack/get_bare_resource_from_ctf.sh \
51+ "ocm.software/ocmcli" \
52+ "" \
53+ "ocmcli" \
54+ "amd64" \
55+ "linux" \
56+ "application/octet-stream" \
57+ ${{ github.workspace }}/gen/ctf-aggregated)"
58+
59+ new_loc="${{ github.workspace }}/bin/ocm"
60+ mkdir -p "$(dirname "$new_loc")"
61+ ln -s "$ocm_binary" "$new_loc"
62+ chmod +x "$new_loc"
63+ echo "OCM binary linked to \"$new_loc\""
64+ echo "binary=\"$new_loc\"" >> "$GITHUB_OUTPUT"
5065
5166 # Download CVs from CTF as TAR, loop over all TARs and upload them to BDBA
5267 - name : Upload CVs from CTF from GH assets to Blackduck
5772 echo "Upload single CVs to BDBA"
5873 echo "Large files may take a while to upload. Please be patient."
5974 echo
60- cd " ${{ github.workspace }}/gen/"
61- ocm download cv --type tar ${{ github.workspace }}/gen/ctf-aggregated
75+ cd ${{ github.workspace }}/gen/
76+ ${{ steps.extract- ocm.outputs.binary }} download cv --type tar ${{ github.workspace }}/gen/ctf-aggregated
6277 # Find all CV tar files within CommonTransportFormat-ctf
6378 find "CommonTransportFormat-${{ github.workspace }}/gen/ctf-aggregated" -type f -print0 | while IFS= read -r -d '' file; do
6479 # Extract the relative path and construct the upload name
0 commit comments