Use curlftpfs for uploading to starcatcher in workflows

This commit is contained in:
Tamás Bálint Misius 2023-08-21 23:24:22 +02:00
parent a9cbd784f7
commit 414f8ba27f
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
2 changed files with 7 additions and 2 deletions

View File

@ -3,4 +3,9 @@
set -euo pipefail set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
LFTP_PASSWORD=$PUBLISH_PASSWORD lftp -c "open --user '$PUBLISH_USERNAME' --env-password -e 'set ftp:ssl-protect-data true; set ssl:verify-certificate false; cd "${PUBLISH_DIRECTORY:-.}"; put \"$PUBLISH_FILENAME\";' ftp://$PUBLISH_HOSTPORT" mountpoint=ftpmnt
mkdir $mountpoint
curlftpfs "$PUBLISH_HOSTPORT" $mountpoint -o ssl,user="$PUBLISH_USERNAME:$PUBLISH_PASSWORD",ciphers='ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256'
cp $PUBLISH_FILENAME $mountpoint/${PUBLISH_DIRECTORY:-.}/
fusermount -u $mountpoint
rmdir $mountpoint

View File

@ -130,7 +130,7 @@ jobs:
with: with:
name: ${{ matrix.asset_name }} name: ${{ matrix.asset_name }}
- run: mv ${{ matrix.asset_path }} ${{ matrix.starcatcher_name }} - run: mv ${{ matrix.asset_path }} ${{ matrix.starcatcher_name }}
- run: sudo apt update && sudo apt install lftp && bash -c './.github/starcatcher-publish.sh' - run: sudo apt update && sudo apt install curlftpfs && bash -c './.github/starcatcher-publish.sh'
env: env:
PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }} PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }}
PUBLISH_USERNAME: ${{ secrets.STARCATCHER_PUBLISH_USERNAME }} PUBLISH_USERNAME: ${{ secrets.STARCATCHER_PUBLISH_USERNAME }}