workflows: re-structure upload job

To try to fix job error.
This commit is contained in:
Henrik Grimler 2021-05-15 22:54:45 +02:00
parent 12c5b81e86
commit e62c896722
1 changed files with 7 additions and 6 deletions

View File

@ -165,11 +165,12 @@ jobs:
# instead of one for each arch on the server. # instead of one for each arch on the server.
archive="termux-packages-${{ github.sha }}.zip" archive="termux-packages-${{ github.sha }}.zip"
deb_archives=$(find -maxdepth 1 -name "debs-*-${{ github.sha }}.tar") deb_archives=$(find -maxdepth 1 -name "debs-*-${{ github.sha }}.tar")
if [ -n "$deb_archives" ]; then
zip $archive ${deb_archives} if [ -z "$deb_archives" ]; then
sftp -P ${{ secrets.PORT }} ${{ secrets.USER }}@grimler.se <<EOF
put $archive /debs/
EOF
else
echo "No archives to upload found" echo "No archives to upload found"
exit 0
fi fi
zip $archive ${deb_archives}
sftp -P ${{ secrets.PORT }} ${{ secrets.USER }}@grimler.se <<EOF
put $archive /debs/
EOF