From 68b16107facb332fac55cf05e24ae11da62f969d Mon Sep 17 00:00:00 2001 From: tuntoja <58987095+tuntoja@users.noreply.github.com> Date: Mon, 8 Jan 2024 08:57:45 +0100 Subject: [PATCH] enh(ci): use upload instead of copy for promote for perl-cpan-libraries (#4808) --- .github/actions/promote-to-stable/action.yml | 21 +++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/actions/promote-to-stable/action.yml b/.github/actions/promote-to-stable/action.yml index 05d5bf2da..1a26c7a7d 100644 --- a/.github/actions/promote-to-stable/action.yml +++ b/.github/actions/promote-to-stable/action.yml @@ -41,16 +41,20 @@ runs: continue fi - echo "[DEBUG] - Build $ARCH target path." TARGET_PATH="rpm-plugins/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/RPMS/${{ inputs.module }}/" echo "[DEBUG] - Target path: $TARGET_PATH" echo "[DEBUG] - Promoting $ARCH testing artifacts to stable." for ARTIFACT in ${SRC_PATHS[@]}; do - echo "[DEBUG] - Promoting $ARTIFACT to stable." - jf rt cp $ARTIFACT $TARGET_PATH --flat=true + echo "[DEBUG] - Downloading $ARTIFACT from TESTING." + jf rt download $ARTIFACT --flat done + for ARTIFACT_DL in $(dir|grep -E "*.rpm"); do + echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH." + jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --flat + done + rm -f *.rpm done shell: bash @@ -78,8 +82,15 @@ runs: echo "[DEBUG] - Promoting DEB testing artifacts to stable." for ARTIFACT in ${SRC_PATHS[@]}; do - echo "[DEBUG] - Promoting $ARTIFACT to stable." - jf rt cp $ARTIFACT $TARGET_PATH --flat=true + echo "[DEBUG] - Downloading $ARTIFACT from TESTING." + jf rt download $ARTIFACT --flat done + for ARTIFACT_DL in $(dir|grep -E "*.deb"); do + ARCH=$(echo $ARTIFACT_DL | cut -d '_' -f3 | cut -d '.' -f1) + echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH." + jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --deb "${{ inputs.distrib }}/main/$ARCH" + done + rm -f *.deb + shell: bash