File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed
.github/actions/opendaq-github-download-artifact Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,28 @@ runs:
2424 ARTIFACT_NAME="${{ inputs.opendaq-artifact-name }}"
2525 ARTIFACT_DIR="$DEST/$ARTIFACT_NAME"
2626
27- gh run download "${{ inputs.opendaq-artifact-run-id }}" \
28- --repo openDAQ/openDAQ \
29- --pattern "$ARTIFACT_NAME" \
30- --dir "$DEST"
27+ echo "ARTIFACT_DIR=$ARTIFACT_DIR"
28+ echo "ARTIFACT_NAME=$ARTIFACT_NAME"
29+ echo "RUN_ID=${{ inputs.opendaq-artifact-run-id }}"
30+
31+ url=$(gh api repos/$REPO/actions/runs/$RUN_ID/artifacts \
32+ --jq ".artifacts[] | select(.name==\"$ARTIFACT_NAME\") | .archive_download_url")
33+
34+ if [ -z "$URL" ]; then
35+ echo "❌ Artifact '$ARTIFACT_NAME' not found in run $RUN_ID"
36+ exit 1
37+ fi
38+
39+ ZIP_PATH="$DEST/$ARTIFACT_NAME.zip"
40+ gh api "$URL" --output "$ZIP_PATH"
41+
42+ echo "📦 Downloaded $ZIP_PATH"
43+ unzip -o "$ZIP_PATH" -d "$DEST/$ARTIFACT_NAME"
44+
45+ # gh run download ${{ inputs.opendaq-artifact-run-id }} \
46+ # --repo openDAQ/openDAQ \
47+ # --name $ARTIFACT_NAME \
48+ # --dir "$DEST"
3149
3250 echo "$ARTIFACT_DIR/"
3351 ls -la "$ARTIFACT_DIR/"
You can’t perform that action at this time.
0 commit comments