mirror of
https://github.com/webfactory/ssh-agent.git
synced 2026-06-25 09:22:28 +03:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25fcd78aa3 | |||
| e838748343 | |||
| a6f90b1f12 | |||
| 72c0bfd31a |
@@ -8,7 +8,7 @@ jobs:
|
|||||||
os: [ ubuntu-latest, macOS-latest, windows-latest ]
|
os: [ ubuntu-latest, macOS-latest, windows-latest ]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- name: Setup key
|
- name: Setup key
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- run: apt update && apt install -y openssh-client git
|
- run: apt update && apt install -y openssh-client git
|
||||||
- name: Setup key
|
- name: Setup key
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|||||||
+2
-1
@@ -7,10 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## v0.9.1 [2024-03-17]
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
* Fix path used to execute ssh-agent in cleanup.js to respect custom paths set by input (#235)
|
* Fix path used to execute ssh-agent in cleanup.js to respect custom paths set by input (#235)
|
||||||
* Fix running with the .ssh directory already existing (#234)
|
|
||||||
|
|
||||||
## v0.9.0 [2024-02-06]
|
## v0.9.0 [2024-02-06]
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ inputs:
|
|||||||
description: 'git command'
|
description: 'git command'
|
||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node24'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
post: 'dist/cleanup.js'
|
post: 'dist/cleanup.js'
|
||||||
post-if: 'always()'
|
post-if: 'always()'
|
||||||
|
|||||||
Vendored
-2
@@ -335,9 +335,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const homeSsh = homePath + '/.ssh';
|
const homeSsh = homePath + '/.ssh';
|
||||||
if (!fs.existsSync(buildDir)) {
|
|
||||||
fs.mkdirSync(homeSsh, { recursive: true });
|
fs.mkdirSync(homeSsh, { recursive: true });
|
||||||
}
|
|
||||||
|
|
||||||
console.log("Starting ssh-agent");
|
console.log("Starting ssh-agent");
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const homeSsh = homePath + '/.ssh';
|
const homeSsh = homePath + '/.ssh';
|
||||||
if (!fs.existsSync(homeSsh)) {
|
|
||||||
fs.mkdirSync(homeSsh, { recursive: true });
|
fs.mkdirSync(homeSsh, { recursive: true });
|
||||||
}
|
|
||||||
|
|
||||||
console.log("Starting ssh-agent");
|
console.log("Starting ssh-agent");
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ const os = require('os');
|
|||||||
const core = require('@actions/core');
|
const core = require('@actions/core');
|
||||||
|
|
||||||
const defaults = (process.env['OS'] != 'Windows_NT') ? {
|
const defaults = (process.env['OS'] != 'Windows_NT') ? {
|
||||||
// Use getent() system call, since this is what ssh does; makes a difference in Docker-based
|
// We use os.userInfo() rather than os.homedir(), since it uses the getpwuid() system call to get the user's home directory (see https://nodejs.org/api/os.html#osuserinfooptions).
|
||||||
// Action runs, where $HOME is different from the pwent
|
// This mimics the way openssh derives the home directory for locating config files (see https://github.com/openssh/openssh-portable/blob/826483d51a9fee60703298bbf839d9ce37943474/ssh.c#L710);
|
||||||
|
// Makes a difference in Docker-based Action runs, when $HOME is different from what getpwuid() returns (which is based on the entry in /etc/passwd)
|
||||||
homePath: os.userInfo().homedir,
|
homePath: os.userInfo().homedir,
|
||||||
sshAgentCmdDefault: 'ssh-agent',
|
sshAgentCmdDefault: 'ssh-agent',
|
||||||
sshAddCmdDefault: 'ssh-add',
|
sshAddCmdDefault: 'ssh-add',
|
||||||
|
|||||||
Reference in New Issue
Block a user