Skip to content

Commit 63cdf42

Browse files
committed
fix: map target names to correct artifact names
The artifact names in fuzz.yml are hardcoded: - file_io -> io-fuzzing-crash-artifacts - array_ops -> operations-fuzzing-crash-artifacts Added case statement to map target name to correct artifact name before downloading. Signed-off-by: Joe Isaacs <[email protected]>
1 parent 111b2c2 commit 63cdf42

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/fuzzer-fix-automation.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,24 @@ jobs:
140140
RUN_ID=$(echo "$ARTIFACT_URL" | grep -oP 'runs/\K[0-9]+')
141141
ARTIFACT_ID=$(echo "$ARTIFACT_URL" | grep -oP 'artifacts/\K[0-9]+')
142142
143-
echo "Downloading artifact $ARTIFACT_ID from run $RUN_ID"
143+
# Map target name to artifact name (hardcoded in fuzz.yml)
144+
TARGET="${{ steps.extract.outputs.target }}"
145+
case "$TARGET" in
146+
file_io)
147+
ARTIFACT_NAME="io-fuzzing-crash-artifacts"
148+
;;
149+
array_ops)
150+
ARTIFACT_NAME="operations-fuzzing-crash-artifacts"
151+
;;
152+
*)
153+
ARTIFACT_NAME="${TARGET}-fuzzing-crash-artifacts"
154+
;;
155+
esac
156+
157+
echo "Downloading artifact $ARTIFACT_NAME (ID: $ARTIFACT_ID) from run $RUN_ID"
144158
145159
# Download the artifact
146-
gh run download "$RUN_ID" --name "${{ steps.extract.outputs.target }}-fuzzing-crash-artifacts" --repo ${{ github.repository }}
160+
gh run download "$RUN_ID" --name "$ARTIFACT_NAME" --repo ${{ github.repository }}
147161
148162
# Verify crash file exists
149163
CRASH_FILE_PATH="${{ steps.extract.outputs.target }}/${{ steps.extract.outputs.crash_file }}"

0 commit comments

Comments
 (0)