Skip to content

Commit

Permalink
Use SSH for Pinouts (rusefi#3388)
Browse files Browse the repository at this point in the history
* switch to ssh

* ssh env vars
  • Loading branch information
chuckwagoncomputing authored Oct 21, 2021
1 parent c7b5351 commit ec57866
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gen-pinouts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
if [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_USER::${{secrets.RUSEFI_DOXYGEN_FTP_USER}}";
echo "::set-env name=RUSEFI_DOXYGEN_FTP_PASS::${{secrets.RUSEFI_DOXYGEN_FTP_PASS}}";
echo "::set-env name=RUSEFI_SSH_SERVER::${{secrets.RUSEFI_SSH_SERVER}}";
echo "::set-env name=RUSEFI_DOXYGEN_SSH_USER::${{secrets.RUSEFI_DOXYGEN_SSH_USER}}";
echo "::set-env name=RUSEFI_DOXYGEN_SSH_PASS::${{secrets.RUSEFI_DOXYGEN_SSH_PASS}}";
fi
- name: Generate documentation
Expand Down
2 changes: 1 addition & 1 deletion misc/actions/pinouts-install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

sudo apt-get update
sudo apt-get install ncftp
sudo apt-get install sshpass
wget https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_linux_amd64
chmod a+x yq_linux_amd64
rm -rf yqdir
Expand Down
5 changes: 2 additions & 3 deletions misc/jenkins/generate_pinouts/gen_upload_pinouts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

misc/actions/pinouts-create.sh

if [ -n "$RUSEFI_FTP_SERVER" ]; then
if [ -n "$RUSEFI_SSH_SERVER" ]; then
echo "Uploading Pinouts..."
ncftpput -r 999 -m -R -z -v -u "$RUSEFI_DOXYGEN_FTP_USER" -p "$RUSEFI_DOXYGEN_FTP_PASS" "$RUSEFI_FTP_SERVER" / pinouts
echo "Uploaded!"
tar -czf - pinouts | sshpass -p "$RUSEFI_DOXYGEN_SSH_PASS" ssh -o StrictHostKeyChecking=no "$RUSEFI_DOXYGEN_SSH_USER"@"$RUSEFI_SSH_SERVER" "tar -xzf -"
fi
[ $? -eq 0 ] || { echo "upload FAILED"; exit 1; }

0 comments on commit ec57866

Please sign in to comment.