diff --git a/.github/scripts/upload-ndi-build.sh b/.github/scripts/upload-ndi-build.sh index f33970979..19cdda59a 100755 --- a/.github/scripts/upload-ndi-build.sh +++ b/.github/scripts/upload-ndi-build.sh @@ -3,12 +3,13 @@ ASSET=${1?Asset name to upload must be given} NDI_REMOTE_SSH=${NDI_REMOTE_SSH:-'xpulec@frakira.fi.muni.cz:$HOME/Public/ug-ndi-builds'} NDI_REMOTE_SSH_HOST_KEY_URL=${NDI_REMOTE_SSH_KEY_PUB_URL:-https://frakira.fi.muni.cz/~xpulec/ssh_known_hosts_github} -if [ -z "$SSH_KEY" ]; then +if [ -z "$NDI_REMOTE_SSH_KEY" ]; then echo "SSH private key required!" >&2 + exit 1 fi mkdir -p ~/.ssh curl -S $NDI_REMOTE_SSH_HOST_KEY_URL -o ~/.ssh/known_hosts -echo "$SSH_KEY" > ~/.ssh/id_rsa +echo "$NDI_REMOTE_SSH_KEY" > ~/.ssh/id_rsa chmod -R go-rwx ~/.ssh scp $ASSET $NDI_REMOTE_SSH diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 7a3731d65..6418d4e5a 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -107,8 +107,8 @@ jobs: - name: Upload NDI Build id: upload-ndi env: - SSH_KEY: ${{ secrets.SSH_KEY }} - if: github.ref == 'refs/heads/ndi-build' && env.SSH_KEY != null + NDI_REMOTE_SSH_KEY: ${{ secrets.NDI_REMOTE_SSH_KEY }} + if: github.ref == 'refs/heads/ndi-build' && env.NDI_REMOTE_SSH_KEY != null run: .github/scripts/upload-ndi-build.sh UltraGrid-$VERSION-x86_64.AppImage - name: Upload Release Asset id: upload-release @@ -184,8 +184,8 @@ jobs: - name: Upload NDI Build id: upload-ndi env: - SSH_KEY: ${{ secrets.SSH_KEY }} - if: github.ref == 'refs/heads/ndi-build' && env.SSH_KEY != null + NDI_REMOTE_SSH_KEY: ${{ secrets.NDI_REMOTE_SSH_KEY }} + if: github.ref == 'refs/heads/ndi-build' && env.NDI_REMOTE_SSH_KEY != null run: .github/scripts/upload-ndi-build.sh UltraGrid-$VERSION.dmg - name: Upload Release Asset id: upload-release @@ -273,8 +273,8 @@ jobs: - name: Upload NDI Build id: upload-ndi env: - SSH_KEY: ${{ secrets.SSH_KEY }} - if: github.ref == 'refs/heads/ndi-build' && env.SSH_KEY != null + NDI_REMOTE_SSH_KEY: ${{ secrets.NDI_REMOTE_SSH_KEY }} + if: github.ref == 'refs/heads/ndi-build' && env.NDI_REMOTE_SSH_KEY != null run: | C:\msys64\usr\bin\bash -cel 'cd build; zip -9 -r UltraGrid-$VERSION-win64.zip UltraGrid-$VERSION-win64 $GITHUB_WORKSPACE/.github/scripts/upload-ndi-build.sh UltraGrid-$VERSION-win64.zip'