From 0c902521b8b9135f0dae7841a01d7d3b19629cb2 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 7 Dec 2025 12:59:02 +0100 Subject: [PATCH] Release/8.0.2 (#93) * fix: only attempt to create dir if not yet exists On self-hosted runners it can happen that an action (docker container) is cached. This leads to the script trying to create the .ssh dir despite it already existing. The action then fails. * fix: only attempt to create file if it doesn't exist yet On self-hosted runners it can happen that an action (docker container) is cached, resulting in aborting this script because the know_hosts file already exists. This if clause fixes it. Setting permissions is intentionally outside the if clause because in all cases we want to reset perms. * fix: reverting printf in favor of echo Like in commit 2c22263 we are using echo again instead of printf because some runners can't function properly with it. * chore: 8.0.2 * chore: readme changes --- README.md | 10 ++++++++-- SECURITY.md | 1 + docker-rsync/hosts-add | 2 +- docker-rsync/hosts-init | 5 ++++- docker-rsync/ssh-init | 4 +++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a8034fd..88e2c3b 100644 --- a/README.md +++ b/README.md @@ -53,14 +53,14 @@ This action needs secret variables for the ssh private key of your key pair. The For simplicity, we are using `REMOTE_*` as the secret variables throughout the examples. -## Current Version: v8 (8.0.1) +## Current Version: v8 (8.0.2) ### Release channels: | Version | Purpose | Immutable | | ------- | ------------------ | ------------------ | | ``v8`` | latest release (pointer to 8.x.x) | no, points to latest MINOR,PATCH | -| 8.0.1 | latest major release | yes | +| 8.0.2 | latest major release | yes | | 7.1.0 | previous release | yes | Check [SECURITY.md](SECURITY.md) for support cycles. @@ -277,6 +277,12 @@ sudo apk add rsync ## Versions +## Version 8.0.0 (EOL due to regression -> fixed via 8.0.1 & 8.0.2) + +Check here: + +- https://github.com/Burnett01/rsync-deployments/tree/8.0.0 (alpine 3.23.0) + ## Version 7.1.0 Check here: diff --git a/SECURITY.md b/SECURITY.md index 88f4643..03f2cc3 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,6 +8,7 @@ The following versions are currently being supported with security updates: | Version | Supported | Rsync version | Alpine version | | ------- | ------------------ | ------------------ | ------------------ | +| 8.0.2 | :white_check_mark: | >= 3.4.1-r1 | 3.23.0 | | 8.0.1 | :white_check_mark: | >= 3.4.1-r1 | 3.23.0 | | 8.0.0 | :x: EOL (due to regression #90) | >= 3.4.1-r1 | 3.23.0 | | 7.1.0 | :white_check_mark: | >= 3.4.1-r0 | 3.22.1 | diff --git a/docker-rsync/hosts-add b/docker-rsync/hosts-add index a2c5e79..3147a47 100755 --- a/docker-rsync/hosts-add +++ b/docker-rsync/hosts-add @@ -2,4 +2,4 @@ set -eu -printf '%s\n' "$@" >> $HOME/.ssh/known_hosts +echo "$@" >> $HOME/.ssh/known_hosts diff --git a/docker-rsync/hosts-init b/docker-rsync/hosts-init index fa4dbe3..0208e08 100755 --- a/docker-rsync/hosts-init +++ b/docker-rsync/hosts-init @@ -2,5 +2,8 @@ set -eu -touch $HOME/.ssh/known_hosts +if [ ! -f "$HOME/.ssh/known_hosts" ]; then + touch $HOME/.ssh/known_hosts +fi + chmod 600 $HOME/.ssh/known_hosts diff --git a/docker-rsync/ssh-init b/docker-rsync/ssh-init index c35c903..3a88cae 100755 --- a/docker-rsync/ssh-init +++ b/docker-rsync/ssh-init @@ -2,4 +2,6 @@ set -eu -mkdir -m 700 $HOME/.ssh +if [ ! -d "$HOME/.ssh" ]; then + mkdir -m 700 $HOME/.ssh +fi