Skip to content

Commit

Permalink
Adapt to OkBuddyGSI
Browse files Browse the repository at this point in the history
  • Loading branch information
sounddrill31 authored Jun 18, 2024
1 parent cd5d610 commit 4e3c40e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/configure-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ jobs:
# Configure 'runner'
- name: Run crave devspace
run: |
crave ${{ secrets.CRAVE_FLAGS }} devspace -- "rm -rf actions-runner || true
crave ${{ secrets.CRAVE_FLAGS }} devspace -- "rm -rf actions-runner-okbuddy || true
curl https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/scripts/runner-setup.sh | bash
if [[ "${{ inputs.RUNNER_TOKEN }}" == "github_pat_*" ]]; then
echo "PAT does not work!"
else
echo "Runner token found"
fi
cd actions-runner
cd actions-runner-okbuddy
./config.sh --unattended --url "https://github.com/${{ github.repository }}" --token "${{ inputs.RUNNER_TOKEN }}""
6 changes: 3 additions & 3 deletions .github/workflows/force-restart-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# Start 'runner' in 'tmux'.
- name: Run crave devspace
run: |
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
crave ${{ secrets.CRAVE_FLAGS }} devspace -- "tmux kill-session -t ghactionsokbuddy || true
tmux new-session -d -s ghactionsokbuddy
tmux send-keys -t ghactionsokbuddy './actions-runner-okbuddy/run.sh' Enter
echo "Runner Started""
8 changes: 4 additions & 4 deletions .github/workflows/selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ jobs:

- name: Run crave devspace
run: |
crave ${{ secrets.CRAVE_FLAGS }} devspace -- "if tmux has-session -t ghactions; then
crave ${{ secrets.CRAVE_FLAGS }} devspace -- "if tmux has-session -t ghactionsokbuddy; then
echo "Runner is already Running"
else
tmux kill-session -t ghactions;
tmux new-session -d -s ghactions
tmux send-keys -t ghactions './actions-runner/run.sh' Enter
tmux kill-session -t ghactionsokbuddy;
tmux new-session -d -s ghactionsokbuddy
tmux send-keys -t ghactionsokbuddy './actions-runner-okbuddy/run.sh' Enter
echo "Runner Started"
fi "
prepare:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/start-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:
# Configure 'runner'
- name: Run crave devspace
run: |
crave ${{ secrets.CRAVE_FLAGS }} devspace -- "rm -rf actions-runner || true
crave ${{ secrets.CRAVE_FLAGS }} devspace -- "rm -rf actions-runner-okbuddy || true
curl -O https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/scripts/code-server.sh ;
bash code-server.sh"
12 changes: 6 additions & 6 deletions scripts/runner-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#!/bin/bash

#Zip download
rm -rf actions-runner || true
rm -rf actions-runner-okbuddy || true

echo "Installing Runner!" #Create folder and download zip
echo "Downloading Zip"
Expand All @@ -16,15 +16,15 @@ rm -rf actions-runner || true
exit 1
fi # Fetch version

url=https://github.com/actions/runner/releases/download/v${version}/actions-runner-linux-x64-${version}.tar.gz # Fetch URL
url=https://github.com/actions/runner/releases/download/v${version}/actions-runner-okbuddy-linux-x64-${version}.tar.gz # Fetch URL
url=$(echo "$url" | xargs) # Remove leading/trailing whitespace
if ! wget -O actions-runner-linux-x64.tar.gz "${url}"; then
if ! wget -O actions-runner-okbuddy-linux-x64.tar.gz "${url}"; then
echo "Failed to download the runner package"
exit 1
fi

echo "Extracting Zip"
mkdir -p actions-runner
tar -xvf actions-runner-linux-x64.tar.gz -C actions-runner
mkdir -p actions-runner-okbuddy
tar -xvf actions-runner-okbuddy-linux-x64.tar.gz -C actions-runner-okbuddy
echo "Removing Leftovers"
rm -rf actions-runner-linux-x64.tar.gz # Extract package and remove leftovers
rm -rf actions-runner-okbuddy-linux-x64.tar.gz # Extract package and remove leftovers

0 comments on commit 4e3c40e

Please sign in to comment.