From 6de252eb348a6d15c661ba613b9010f347c4953f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Sun, 14 Apr 2024 20:34:25 +0200 Subject: [PATCH] Check starcatcher credentials early It's infuriating when the entire workflow fails at the publish stage because Discord pretends to have markdown. --- .github/starcatcher-publish.sh | 4 +++- .github/workflows/build.yaml | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/starcatcher-publish.sh b/.github/starcatcher-publish.sh index 6b29e48aa..ef89a4f53 100755 --- a/.github/starcatcher-publish.sh +++ b/.github/starcatcher-publish.sh @@ -13,6 +13,8 @@ chmod 660 ~/.netrc mountpoint=ftpmnt mkdir $mountpoint curlftpfs "$PUBLISH_HOSTPORT" $mountpoint -o ssl,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:-.}/ +if [[ -z ${PUBLISH_ACCESSCHECK-} ]]; then + cp $PUBLISH_FILENAME $mountpoint/${PUBLISH_DIRECTORY:-.}/ +fi fusermount -u $mountpoint rmdir $mountpoint diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7131e51c8..47f71d101 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,6 +41,13 @@ jobs: env: PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }} GITHUB_REF: ${{ github.ref }} + - if: steps.prepare.outputs.do_publish == 'yes' + run: sudo apt update && sudo apt install curlftpfs && bash -c './.github/starcatcher-publish.sh' + env: + PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }} + PUBLISH_USERNAME: ${{ secrets.STARCATCHER_PUBLISH_USERNAME }} + PUBLISH_PASSWORD: ${{ secrets.STARCATCHER_PUBLISH_PASSWORD }} + PUBLISH_ACCESSCHECK: yes - if: steps.prepare.outputs.do_release == 'yes' id: create_release env: