Skip to content

Commit

Permalink
use choco to install ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
Mason Fish committed Oct 20, 2020
1 parent eef0a53 commit 0a8afc2
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
strategy:
matrix:
node-version: [12.x]
os: [ubuntu-18.04]
os: [windows-2019]
# needs: build
steps:
# - run: git config --global core.autocrlf false
Expand Down Expand Up @@ -172,31 +172,35 @@ jobs:
# Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force
# Install-WindowsUpdate -KBArticleID "KB4470788","KB4470502","KB4471332","KB4480116","KB4494174","KB4495667" -Install
# shell: powershell
# - name: Run SSH server
- name: Install Choco and SSH server (Windows)
# if: failure()
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y openssh -params `"/SSHServerFeature /KeyBasedAuthenticationFeature"`
# run: |
# Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
# Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
# Start-Service sshd
# shell: powershell
# - name: Start SSH via Ngrok (Windows)
# if: failure()
# run: |
# curl -sL https://gist.githubusercontent.com/mason-fish/cbaf2ebdf8437cb4401b9aaf03e443a7/raw/a5d0fba00ccda9c72975025341e770dbdc12830b/windows_ngrok.sh | bash
# env:
# NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
# USER_PASS: ${{ secrets.NGROK_PASS }}
# shell: bash

- name: Start SSH via Ngrok (Linux)
# if: failure()
shell: powershell
- name: Start SSH via Ngrok (Windows)
# if: failure()
run: |
curl -sL https://gist.githubusercontent.com/mason-fish/2a8c97d4829204a90035db558e85239e/raw/3ac18ea080fb06d391caa91180ebb927279072bf/linux_ngrok.sh | bash
curl -sL https://gist.githubusercontent.com/mason-fish/cbaf2ebdf8437cb4401b9aaf03e443a7/raw/a5d0fba00ccda9c72975025341e770dbdc12830b/windows_ngrok.sh | bash
env:
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
USER_PASS: ${{ secrets.NGROK_PASS }}
shell: bash

# - name: Start SSH via Ngrok (Linux)
# # if: failure()
# run: |
# curl -sL https://gist.githubusercontent.com/mason-fish/2a8c97d4829204a90035db558e85239e/raw/3ac18ea080fb06d391caa91180ebb927279072bf/linux_ngrok.sh | bash
# env:
# NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
# USER_PASS: ${{ secrets.NGROK_PASS }}
# shell: bash
- name: Keep alive
# if: failure()
run: sleep 1h
Expand Down

0 comments on commit 0a8afc2

Please sign in to comment.