diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml new file mode 100644 index 0000000..42a1e26 --- /dev/null +++ b/.github/workflows/demo.yml @@ -0,0 +1,46 @@ +on: [ push, pull_request ] + +jobs: + deployment_keys_demo: + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macOS-latest, windows-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Setup key + uses: ./ + with: + ssh-private-key: | + ${{ secrets.MPDUDE_TEST_1_DEPLOY_KEY }} + ${{ secrets.MPDUDE_TEST_2_DEPLOY_KEY }} + - run: | + git clone https://github.com/mpdude/test-1.git test-1-http + git clone git@github.com:mpdude/test-1.git test-1-git + git clone ssh://git@github.com/mpdude/test-1.git test-1-git-ssh + git clone https://github.com/mpdude/test-2.git test-2-http + git clone git@github.com:mpdude/test-2.git test-2-git + git clone ssh://git@github.com/mpdude/test-2.git test-2-git-ssh + + docker_demo: + runs-on: ubuntu-latest + container: + image: ubuntu:latest + steps: + - uses: actions/checkout@v4 + - run: apt update && apt install -y openssh-client git + - name: Setup key + uses: ./ + with: + ssh-private-key: | + ${{ secrets.MPDUDE_TEST_1_DEPLOY_KEY }} + ${{ secrets.MPDUDE_TEST_2_DEPLOY_KEY }} + - run: | + git clone https://github.com/mpdude/test-1.git test-1-http + git clone git@github.com:mpdude/test-1.git test-1-git + git clone ssh://git@github.com/mpdude/test-1.git test-1-git-ssh + git clone https://github.com/mpdude/test-2.git test-2-http + git clone git@github.com:mpdude/test-2.git test-2-git + git clone ssh://git@github.com/mpdude/test-2.git test-2-git-ssh + diff --git a/dist/cleanup.js b/dist/cleanup.js index 18202e4..7e478b7 100644 --- a/dist/cleanup.js +++ b/dist/cleanup.js @@ -2824,7 +2824,9 @@ const os = __webpack_require__(87); const core = __webpack_require__(470); const defaults = (process.env['OS'] != 'Windows_NT') ? { - homePath: os.homedir(), + // Use getent() system call, since this is what ssh does; makes a difference in Docker-based + // Action runs, where $HOME is different from the pwent + homePath: os.userInfo().homedir, sshAgentCmdDefault: 'ssh-agent', sshAddCmdDefault: 'ssh-add', gitCmdDefault: 'git' diff --git a/dist/index.js b/dist/index.js index 5be2d35..3f288c7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2898,7 +2898,9 @@ const os = __webpack_require__(87); const core = __webpack_require__(470); const defaults = (process.env['OS'] != 'Windows_NT') ? { - homePath: os.homedir(), + // Use getent() system call, since this is what ssh does; makes a difference in Docker-based + // Action runs, where $HOME is different from the pwent + homePath: os.userInfo().homedir, sshAgentCmdDefault: 'ssh-agent', sshAddCmdDefault: 'ssh-add', gitCmdDefault: 'git'