fix(promote): fix pattern used for promote upload (#5006)

This commit is contained in:
tuntoja 2024-04-30 11:55:59 +02:00 committed by GitHub
parent 5605da104a
commit 45dfba82ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 6 deletions

View File

@ -89,13 +89,8 @@ runs:
jf rt download $ARTIFACT --flat jf rt download $ARTIFACT --flat
done done
for ARTIFACT_DL in $(dir|grep -E "*.deb"); do for ARTIFACT_DL in $(dir -1|grep -E "*${{ inputs.distrib }}*.deb"); do
ARCH=$(echo $ARTIFACT_DL | cut -d '_' -f3 | cut -d '.' -f1) ARCH=$(echo $ARTIFACT_DL | cut -d '_' -f3 | cut -d '.' -f1)
DISTRIB=$(echo $ARTIFACT_DL | cut -d '_' -f2 | cut -d '-' -f2)
if [[ "${{ inputs.distrib }}" != "$DISTRIB" ]]; then
echo "::error::Distrib [$DISTRIB] from package does not match distrib [${{ inputs.distrib }}] from input, aborting promotion."
exit 1
fi
echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH." echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH."
jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --deb "${{ inputs.distrib }}/main/$ARCH" jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --deb "${{ inputs.distrib }}/main/$ARCH"
done done