mirror of
https://github.com/armbian/os.git
synced 2026-01-06 10:38:50 -08:00
Upload fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user