Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ngrok version #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,24 @@ on:
description: 'When set to non-zero, a step will fail causing the SSH server to be started'
required: true
default: "0"
os:
description: 'OS'
required: true
default: 'macos-latest'
type: choice
options:
- macos-latest
- ubuntu-latest
timeout:
description: 'How long to run (minutes)'
required: false
type: number
default: "10"

jobs:
sample:
name: Sample
runs-on: ubuntu-latest
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v2

Expand All @@ -24,7 +37,7 @@ jobs:

- name: Start SSH server on failure
if: ${{ failure() }}
timeout-minutes: 10
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
uses: ./
with:
ngrok-authtoken: "${{ secrets.NGROK_AUTHTOKEN }}"
Expand Down
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ runs:
fi

if [[ "${RUNNER_OS}" == 'Linux' ]]; then
ngrokurl="https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip"
ngrokurl="https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz"
installcmd="sudo apt-get -qy"
extract="tar xvzf"
extract_dest="-C"
else
ngrokurl="https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-amd64.zip"
ngrokurl="https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-darwin-amd64.zip"
installcmd="brew"
extract="unzip"
extract_dest="-d"
fi

if ! [[ -f /usr/sbin/sshd ]]; then
Expand All @@ -34,7 +38,7 @@ runs:
if ! command -v ngrok > /dev/null; then
$installcmd install curl unzip
curl -o /tmp/ngrok.zip -sL $ngrokurl
sudo unzip /tmp/ngrok.zip -d /usr/local/bin
sudo $extract /tmp/ngrok.zip $extract_dest /usr/local/bin
rm /tmp/ngrok.zip
fi

Expand Down