mirror of
https://github.com/appleboy/ssh-action.git
synced 2026-07-04 19:35:45 +00:00
Compare commits
5 Commits
71d43ea0f7
...
06fa62e61c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06fa62e61c | ||
|
|
28428a13f5 | ||
|
|
5ade826485 | ||
|
|
8b6078208d | ||
|
|
036cad7df7 |
@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/appleboy/drone-ssh:1.7.4
|
FROM ghcr.io/appleboy/drone-ssh:1.7.7
|
||||||
|
|
||||||
COPY entrypoint.sh /bin/entrypoint.sh
|
COPY entrypoint.sh /bin/entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
19
README.md
19
README.md
@ -122,14 +122,29 @@ Copy Private Key content and paste in Github Secrets.
|
|||||||
|
|
||||||
### Copy rsa Private key
|
### Copy rsa Private key
|
||||||
|
|
||||||
|
Before copying the private key, install `clip` command as shown below:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clip < ~/.ssh/id_rsa
|
# Ubuntu
|
||||||
|
sudo apt-get install xclip
|
||||||
|
```
|
||||||
|
|
||||||
|
copy the private key:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# macOS
|
||||||
|
pbcopy < ~/.ssh/id_rsa
|
||||||
|
# Ubuntu
|
||||||
|
xclip < ~/.ssh/id_rsa
|
||||||
```
|
```
|
||||||
|
|
||||||
### Copy ed25519 Private key
|
### Copy ed25519 Private key
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clip < ~/.ssh/id_ed25519
|
# macOS
|
||||||
|
pbcopy < ~/.ssh/id_ed25519
|
||||||
|
# Ubuntu
|
||||||
|
xclip < ~/.ssh/id_ed25519
|
||||||
```
|
```
|
||||||
|
|
||||||
See the detail information about [SSH login without password](http://www.linuxproblem.org/art_9.html).
|
See the detail information about [SSH login without password](http://www.linuxproblem.org/art_9.html).
|
||||||
|
|||||||
@ -8,7 +8,7 @@ export GITHUB="true"
|
|||||||
|
|
||||||
GITHUB_ACTION_PATH="${GITHUB_ACTION_PATH%/}"
|
GITHUB_ACTION_PATH="${GITHUB_ACTION_PATH%/}"
|
||||||
DRONE_SSH_RELEASE_URL="${DRONE_SSH_RELEASE_URL:-https://github.com/appleboy/drone-ssh/releases/download}"
|
DRONE_SSH_RELEASE_URL="${DRONE_SSH_RELEASE_URL:-https://github.com/appleboy/drone-ssh/releases/download}"
|
||||||
DRONE_SSH_VERSION="${DRONE_SSH_VERSION:-1.7.4}"
|
DRONE_SSH_VERSION="${DRONE_SSH_VERSION:-1.7.7}"
|
||||||
|
|
||||||
function detect_client_info() {
|
function detect_client_info() {
|
||||||
if [ -n "${SSH_CLIENT_OS-}" ]; then
|
if [ -n "${SSH_CLIENT_OS-}" ]; then
|
||||||
@ -61,6 +61,9 @@ DOWNLOAD_URL_PREFIX="${DRONE_SSH_RELEASE_URL}/v${DRONE_SSH_VERSION}"
|
|||||||
CLIENT_BINARY="drone-ssh-${DRONE_SSH_VERSION}-${CLIENT_PLATFORM}-${CLIENT_ARCH}"
|
CLIENT_BINARY="drone-ssh-${DRONE_SSH_VERSION}-${CLIENT_PLATFORM}-${CLIENT_ARCH}"
|
||||||
TARGET="${GITHUB_ACTION_PATH}/${CLIENT_BINARY}"
|
TARGET="${GITHUB_ACTION_PATH}/${CLIENT_BINARY}"
|
||||||
echo "Will download ${CLIENT_BINARY} from ${DOWNLOAD_URL_PREFIX}"
|
echo "Will download ${CLIENT_BINARY} from ${DOWNLOAD_URL_PREFIX}"
|
||||||
curl -fL --retry 3 --keepalive-time 2 "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o ${TARGET}
|
curl -fL --retry 5 --keepalive-time 2 "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o ${TARGET}
|
||||||
chmod +x ${TARGET}
|
chmod +x ${TARGET}
|
||||||
sh -c "${TARGET} $*"
|
echo "======= CLI Version ======="
|
||||||
|
sh -c "${TARGET} --version" # print version
|
||||||
|
echo "==========================="
|
||||||
|
sh -c "${TARGET} $*" # run the command
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user