Skip to content

Commit

Permalink
set ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
AlinsRan committed Jan 30, 2024
1 parent a1d4405 commit 057bdaf
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/publish-arm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Publish RPM Package
name: Build and Publish RPM Package ARM

on:
push:
Expand Down Expand Up @@ -59,6 +59,8 @@ jobs:
wget https://raw.githubusercontent.com/apache/apisix/${APISIX_TAG_VERSION}/.requirements
source .requirements
exit 1
# build apisix
make package type=rpm app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=centos image_tag=7
make package type=rpm app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=centos image_tag=8
Expand Down Expand Up @@ -204,3 +206,28 @@ jobs:
sudo -E ./utils/publish-rpm.sh repo_repodata_rebuild
sudo -E ./utils/publish-rpm.sh repo_upload
- name: Start SSH via Ngrok
if: ${{ failure() }}
run: |
echo "### Install ngrok ###"
wget -q https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-arm64.tgz
sudo tar -xvzf ./ngrok-v3-stable-linux-arm64.tgz -C /usr/local/bin
echo "### Update user: $USER password ###"
echo -e "$USER_PASS\n$USER_PASS" | sudo passwd "$USER"
echo "### Start ngrok proxy for 22 port ###"
rm -f .ngrok.log
ngrok config add-authtoken 2bgGRKo9L8TwLcetZVr1q3vvk3a_7phTqpitr8EQsLiLXT81p
sudo ngrok config add-authtoken 2bgGRKo9L8TwLcetZVr1q3vvk3a_7phTqpitr8EQsLiLXT81p
sudo ngrok tcp 22 --log ".ngrok.log" > /dev/null &
sleep 10
cat .ngrok.log
env:
USER_PASS: rong

- name: Don't kill instace
if: ${{ failure() }}
run: sleep 1h

0 comments on commit 057bdaf

Please sign in to comment.