-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to fix network not reachable error
- Loading branch information
1 parent
cc63b0d
commit f1a1402
Showing
1 changed file
with
20 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,18 +19,7 @@ jobs: | |
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
# - name: print out example job | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${RASPBERRY_PI_IP} | ||
# username: ${RASPBERRY_PI_UNAME} | ||
# key: ${SSH_PRIVATE_KEY} | ||
# port: 22 | ||
# command_timeout: 30m | ||
# script: | | ||
# echo "Nice Job!!!" | ||
|
||
|
||
- name: Set up SSH on actions container | ||
run: | | ||
mkdir -p ~/.ssh | ||
|
@@ -40,26 +29,24 @@ jobs: | |
# # echo ${{ secrets.RASPBERRY_PI_UNAME }} | ||
# # echo ${{ secrets.RPI_IP_DEV }} | ||
# ssh -v ${{ secrets.RASPBERRY_PI_UNAME }}@${{ secrets.RPI_IP_DEV }} | ||
# - name: Copy systemd unit file to Raspberry Pi | ||
# - name: Get current branch name | ||
# id: get_branch | ||
# run: | | ||
# scp ./path/to/your/systemd.service pi@${RASPBERRY_PI_IP}:/home/pi/ | ||
- name: Get current branch name | ||
id: get_branch | ||
run: | | ||
echo "Branch ref: $GITHUB_REF" | ||
BRANCH_NAME=${GITHUB_REF#refs/heads/} | ||
echo "Branch name: $BRANCH_NAME" | ||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
# echo "Branch ref: $GITHUB_REF" | ||
# BRANCH_NAME=${GITHUB_REF#refs/heads/} | ||
# echo "Branch name: $BRANCH_NAME" | ||
# echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
|
||
- name: Clone telegnotify repository to Raspberry pi and compile it | ||
run: | | ||
ssh ${RASPBERRY_PI_UNAME}@${RASPBERRY_PI_IP} " | ||
mkdir -p "/home/${RASPBERRY_PI_UNAME}/source/github.com/eensymachines.in/telegnotify" | ||
cd "/home/${RASPBERRY_PI_UNAME}/source/github.com/eensymachines.in/telegnotify" | ||
if [ -z $(ls -A "/home/${RASPBERRY_PI_UNAME}/source/github.com/eensymachines.in/telegnotify") ]; then\ | ||
git clone ${REPO_URL}\ | ||
else\ | ||
git pull origin ${{ env.BRANCH_NAME }} | ||
git checkout ${{ env.BRANCH_NAME }} | ||
go build . -o /usr/local/bin/telegnotify | ||
" | ||
# - name: Clone telegnotify repository to Raspberry pi and compile it | ||
# run: | | ||
# ssh ${RASPBERRY_PI_UNAME}@${RASPBERRY_PI_IP} " | ||
# mkdir -p "/home/${RASPBERRY_PI_UNAME}/source/github.com/eensymachines.in/telegnotify" | ||
# cd "/home/${RASPBERRY_PI_UNAME}/source/github.com/eensymachines.in/telegnotify" | ||
# if [ -z $(ls -A "/home/${RASPBERRY_PI_UNAME}/source/github.com/eensymachines.in/telegnotify") ]; then\ | ||
# git clone ${REPO_URL}\ | ||
# else\ | ||
# git pull origin ${{ env.BRANCH_NAME }} | ||
# git checkout ${{ env.BRANCH_NAME }} | ||
# go build . -o /usr/local/bin/telegnotify | ||
# " |