Upload fix

This commit is contained in:
Igor Pecovnik
2026-01-03 02:23:40 +01:00
parent 063c1372f9
commit 64a6fc1bf2

View File

@@ -108,25 +108,26 @@ jobs: # <TEMPLATE-IGNORE>
- name: "Fix permissions and sync artifacts"
run: |
set -euo pipefail
echo "Fix permissions on output/"
sudo chown -R "$USER:$USER" output/.
#echo "Fix permissions on output/"
#sudo chown -R "$USER:$USER" output/.
# Decide target subfolder
TARGET=""
if [ "${{ github.event.inputs.skipImages }}" = "no" ] || [ "[[skipImagesDefaults]]" = "no" ]; then
echo "Save to user's partial folder"
TARGET="partial/${{ github.actor }}/"
fi
#if [ "${{ github.event.inputs.skipImages }}" = "no" ] || [ "[[skipImagesDefaults]]" = "no" ]; then
# echo "Save to user's partial folder"
# TARGET="partial/${{ github.actor }}/"
#fi
if [ "$GITHUB_WORKFLOW" = "Build All Stable Artifacts (cronjob)" ]; then
echo "Nightly workflow detected"
TARGET="stable-daily/"
fi
#if [ "$GITHUB_WORKFLOW" = "Build All Stable Artifacts (cronjob)" ]; then
# echo "Nightly workflow detected"
# TARGET="stable-daily/"
#fi
echo "Fix permissions on /incoming"
sudo chown -R "${{ secrets.HOST_UPLOAD_USER }}:${{ secrets.HOST_UPLOAD_USER }}" /incoming/.
#echo "Fix permissions on /incoming"
#sudo chown -R "${{ secrets.HOST_UPLOAD_USER }}:${{ secrets.HOST_UPLOAD_USER }}" /incoming/.
echo "Sync all parts (only debs***)"
rsync -e "ssh -p ${{ secrets.HOST_UPLOAD_PORT }} -o StrictHostKeyChecking=accept-new" \
@@ -134,9 +135,10 @@ jobs: # <TEMPLATE-IGNORE>
--include='debs***' \
--exclude='*' \
--remove-source-files \
--omit-dir-times \
--delete \
output/ \
"${{ secrets.HOST_UPLOAD_USER }}@${{ secrets.HOST_UPLOAD }}:storage/{{ env.TARGET_PATH }}${TARGET}"
"${{ secrets.HOST_UPLOAD_USER }}@${{ secrets.HOST_UPLOAD }}:storage/${{ env.TARGET_PATH }}${TARGET}"
echo "Clean up empty directories in output/"
find output/. -type d -empty -delete