Skip to content

Commit

Permalink
GHA CI: Fix installer deploy (trikset#1749)
Browse files Browse the repository at this point in the history
* Fix error with quotes

* Add secrets: inherit flag for reusable workflow

* Update build_installer.sh
  • Loading branch information
MinyazevR authored Jul 28, 2024
1 parent d55e89e commit fcef1c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ jobs:
build_installer: true
qmake_extra: "CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
tests: true
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ jobs:
build_installer: true
qmake_extra: " CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
tests: true
secrets: inherit
12 changes: 6 additions & 6 deletions buildScripts/github/build_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ df -h .
NEED_DEPLOY=$([[ "$GITHUB_REPOSITORY" == "trikset/trik-studio" && "${PULLREQUESTNUMBER:-false}" == "false" ]] && echo true || echo false )

if $NEED_DEPLOY ; then
$EXECUTOR bash -ic "install -m 600 -D /dev/null ~/.ssh/id_rsa && echo $ssh_key > ~/.ssh/id_rsa"
$EXECUTOR bash -c "mkdir -p ~/.ssh && install -m 600 /dev/null ~/.ssh/id_rsa && echo \"$ssh_key\" > ~/.ssh/id_rsa"
fi

if [[ $RUNNER_OS == Linux ]] ; then
echo Start build checker archive
$EXECUTOR bash -ic "bin/$CONFIG/build-checker-installer.sh"
$EXECUTOR bash -c "bin/$CONFIG/build-checker-installer.sh"
if $NEED_DEPLOY ; then
$EXECUTOR bash -ic "rsync -v --rsh="ssh -o StrictHostKeyChecking=no" bin/$CONFIG/trik_checker.tar.xz $username@$host:~/dl/ts/fresh/checker/checker-linux-$CONFIG-$BRANCH_NAME.tar.xz"
$EXECUTOR bash -c "rsync -v --rsh='ssh -o StrictHostKeyChecking=no' bin/$CONFIG/trik_checker.tar.xz $username@$host:~/dl/ts/fresh/checker/checker-linux-$CONFIG-$BRANCH_NAME.tar.xz"
fi
fi

echo Start build installer
$EXECUTOR bash -ic "installer/build-trik-studio.sh $QTBIN $QTIFWBIN ."
$EXECUTOR bash -c "installer/build-trik-studio.sh $QTBIN $QTIFWBIN ."

if $NEED_DEPLOY ; then
$EXECUTOR bash -ic "\
$EXECUTOR bash -c "\
mv installer/trik-studio*installer* installer/$TSNAME \
&& rsync -v --rsh="ssh -o StrictHostKeyChecking=no" installer/$TSNAME $username@$host:~/dl/ts/fresh/installer/$TSNAME"
&& rsync -v --rsh='ssh -o StrictHostKeyChecking=no' installer/$TSNAME $username@$host:~/dl/ts/fresh/installer/$TSNAME"
fi

0 comments on commit fcef1c2

Please sign in to comment.