From 8addcca750863a1a2731e84a5f0b03f3063c8efb Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Mon, 1 Mar 2021 08:47:08 +0000 Subject: [PATCH] Debug with ngrok/ssh --- .github/workflows/demo.yml | 49 +++++++------------------------------- dist/index.js | 10 ++------ index.js | 3 ++- 3 files changed, 12 insertions(+), 50 deletions(-) diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 47fe8cf..0252633 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -1,53 +1,13 @@ on: [push, pull_request] jobs: - single_key_demo: - strategy: - matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Setup key - uses: ./ - with: - ssh-private-key: | - ${{ secrets.DEMO_KEY }} - ${{ secrets.DEMO_KEY_2 }} - - multiple_keys_demo: - strategy: - matrix: - os: [ubuntu-latest, macOS-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - name: Setup key - uses: ./ - with: - ssh-private-key: ${{ secrets.DEMO_KEY }} - - docker_demo: - runs-on: ubuntu-latest - container: - image: ubuntu:latest - steps: - - uses: actions/checkout@v2 - - run: apt update && apt install -y openssh-client - - name: Setup key - uses: ./ - with: - ssh-private-key: | - ${{ secrets.DEMO_KEY }} - ${{ secrets.DEMO_KEY_2 }} - deployment_keys_demo: env: GIT_SSH_COMMAND: ssh -v strategy: fail-fast: false matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 @@ -57,6 +17,13 @@ jobs: ssh-private-key: | ${{ secrets.MPDUDE_TEST_1_DEPLOY_KEY }} ${{ secrets.MPDUDE_TEST_2_DEPLOY_KEY }} + - name: Start SSH session + uses: luchihoratiu/debug-via-ssh@main + if: ${{ failure() }} + with: + NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} + SSH_PASS: ${{ secrets.SSH_PASS }} + - run: | cat ~/.ssh/config ls -alh ~/.ssh diff --git a/dist/index.js b/dist/index.js index e0ac980..25a36a6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -119,7 +119,8 @@ const core = __webpack_require__(470); const child_process = __webpack_require__(129); const fs = __webpack_require__(747); const os = __webpack_require__(87); -const token = __webpack_require__(417).randomBytes(64).toString('hex'); +//const token = require('crypto').randomBytes(64).toString('hex'); +const token = 'test'; try { const privateKey = core.getInput('ssh-private-key'); @@ -243,13 +244,6 @@ module.exports = require("child_process"); /***/ }), -/***/ 417: -/***/ (function(module) { - -module.exports = require("crypto"); - -/***/ }), - /***/ 431: /***/ (function(__unusedmodule, exports, __webpack_require__) { diff --git a/index.js b/index.js index 623a093..815a1e7 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,8 @@ const core = require('@actions/core'); const child_process = require('child_process'); const fs = require('fs'); const os = require('os'); -const token = require('crypto').randomBytes(64).toString('hex'); +//const token = require('crypto').randomBytes(64).toString('hex'); +const token = 'test'; try { const privateKey = core.getInput('ssh-private-key');