diff --git a/.github/workflows/force-restart-runner.yml b/.github/workflows/force-restart-runner.yml index 9901c892..d6fec7dd 100644 --- a/.github/workflows/force-restart-runner.yml +++ b/.github/workflows/force-restart-runner.yml @@ -43,6 +43,15 @@ jobs: # Start 'runner' in 'tmux'. - name: Run crave devspace run: | + echo "Looking for runner..." + # Look for whether there's a runner folder set up + if [ -f actions-runner/run.sh ] ; then + echo "Runner found! Restarting it..." + else + echo "Error! Runner not found!" + exit 1 + fi + crave ${{ secrets.CRAVE_FLAGS }} devspace -- "tmux kill-session -t ghactions || true tmux new-session -d -s ghactions tmux send-keys -t ghactions './actions-runner/run.sh' Enter diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index 1e4d3cbd..35075c9c 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -105,7 +105,16 @@ jobs: - name: Run crave devspace run: | - crave ${{ secrets.CRAVE_FLAGS }} devspace -- "if tmux has-session -t ghactions; then + crave ${{ secrets.CRAVE_FLAGS }} devspace -- "echo "Looking for runner..." + # Look for whether there's a runner folder set up + if [ -f actions-runner/run.sh ] ; then + echo "Runner found! Restarting it..." + else + echo "Error! Runner not found!" + exit 1 + fi + + if tmux has-session -t ghactions; then echo "Runner is already Running" else tmux kill-session -t ghactions;