Skip to content

Commit 707ac38

Browse files
committed
gh-actions: pattern downloads are nested further
1 parent bdfae55 commit 707ac38

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
SBOM_INFO: ${{ inputs.sbom_info }}
6262
ARTIFACT_PATTERN: "firestack-aar-*"
6363
SBOM_PATTERN: "firestack-sbom-*"
64+
ARTIFACT_PREFIX: "firestack-aar-"
65+
SBOM_PREFIX: "firestack-sbom-"
6466
SBOM_MANIFEST: "manifest.spdx.json"
6567
SBOM_PREDICATE: "https://spdx.dev/Document/v2.2"
6668

@@ -121,9 +123,12 @@ jobs:
121123
REPO: ${{ github.repository }}
122124
ART_DIR: ${{ steps.dlaar.outputs.download-path }}
123125
GH_TOKEN: ${{ github.token }}
126+
SHA: ${{ steps.runmeta.outputs.sha }}
124127
run: |
125128
set -euo pipefail
126129
ls -ltr "${ART_DIR}/"
130+
ART_DIR="${ART_DIR}/${ARTIFACT_PREFIX}${SHA}"
131+
ls -ltr "${ART_DIR}/"
127132
for file in "$ART_DIR/${FOUT}" "$ART_DIR/${FOUTDBG}"; do
128133
if [ ! -f "$file" ]; then
129134
echo "::error::missing artifact $file" >&2
@@ -155,10 +160,13 @@ jobs:
155160
REPO: ${{ github.repository }}
156161
ART_DIR: ${{ steps.dlsbom.outputs.download-path }}
157162
GH_TOKEN: ${{ github.token }}
163+
SHA: ${{ steps.runmeta.outputs.sha }}
158164
run: |
159165
# andrewlock.net/creating-sbom-attestations-in-github-actions/
160166
set -euo pipefail
161167
ls -ltr "${ART_DIR}/"
168+
ART_DIR="${ART_DIR}/${SBOM_PREFIX}${SHA}"
169+
ls -ltr "${ART_DIR}/"
162170
if [ -n "${SBOM_INFO:-}" ]; then
163171
name=$(jq -r '.path' <<<"${SBOM_INFO}")
164172
sbom_file="$ART_DIR/$(jq -r '.artifactName' <<<"${SBOM_INFO}")/${name}"

0 commit comments

Comments
 (0)