Compare commits

...

8 Commits

Author SHA1 Message Date
dependabot[bot] 6796eab63e chore(deps): bump alpine from 3.23.0 to 3.23.2 (#97)
* chore(deps): bump alpine from 3.23.0 to 3.23.2

Bumps alpine from 3.23.0 to 3.23.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: 3.23.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(docs): update Alpine version to 3.23.2 in README and SECURITY files

* chore(docs): update current version to 8.0.3 in README

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Steven <s-8@outlook.com>
2026-01-02 21:46:05 +01:00
Steven 81be6cf6d7 chore: add deprecation notice, move release channels to top 2025-12-09 21:22:31 +01:00
Steven 178d2ea600 chore: deprecation notice 2025-12-09 14:45:28 +01:00
Steven 241aa321a8 chore: add support cycles 2025-12-07 14:02:36 +01:00
Steven 80e4fa792e chore: update readme
- advise users to always use secrets
- simplified examples
- other adjustments
2025-12-07 13:51:46 +01:00
Steven 0c902521b8 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
2025-12-07 12:59:02 +01:00
Steven 68d1fd5150 chore: 8.0.1 2025-12-06 21:44:40 +00:00
Steven 2c22263f9c fix: regression - using echo instead of printf again #90
It was found via #90 and #89 that using printf causes problems.
In the previous version 7.1.0 we used echo instead of printf - hence we are bringing this back for version 8.0.x
2025-12-06 22:33:01 +01:00
7 changed files with 91 additions and 69 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
FROM alpine:3.23.0@sha256:51183f2cfa6320055da30872f211093f9ff1d3cf06f39a0bdb212314c5dc7375 AS base
FROM alpine:3.23.2@sha256:865b95f46d98cf867a156fe4a135ad3fe50d2056aa3f25ed31662dff6da4eb62 AS base
RUN apk update && apk add --no-cache --upgrade rsync openssh openssl busybox
+65 -51
View File
@@ -10,13 +10,50 @@ This cross-platform GitHub Action deploys files in [`path`](#inputs) (relative t
Use this action in a CD workflow which leaves deployable code in `GITHUB_WORKSPACE`, such [actions/checkout](https://github.com/actions/checkout).
The base-image of this action is very small and based on **Alpine 3.23.0** (no cache) which results in fast deployments.
The base-image of this action is very small and based on **Alpine 3.23.2** (no cache) which results in fast deployments.
Alpine version: [3.23.0](https://www.alpinelinux.org/posts/Alpine-3.23.0-released.html)
Alpine version: [3.23.2](https://www.alpinelinux.org/posts/Alpine-3.23.2-released.html)
Rsync version: [3.4.1-r1](https://download.samba.org/pub/rsync/NEWS#3.4.1)
## Current Version: v8 (8.0.3)
### Release channels:
| Version | Purpose | Immutable |
| ------- | ------------------ | ------------------ |
| ``v8`` (recommended) | latest MAJOR (pointer to 8.MINOR.PATCH) | no |
| 8.0.3 | latest MINOR+PATCH | yes |
| 7.1.0 | previous MAJOR ([deprecation notice](https://github.com/Burnett01/rsync-deployments/discussions/96)) | yes |
Check [SECURITY.md](SECURITY.md) for support cycles.
---
## How it works
```yml
name: DEPLOY
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: rsync deployments
uses: burnett01/rsync-deployments@v8
with:
switches: -avzr --delete
path: src/
remote_path: ${{ secrets.REMOTE_PATH }} # ex: /var/www/html/
remote_host: ${{ secrets.REMOTE_HOST }} # ex: example.com
remote_port: ${{ secrets.REMOTE_PORT }} # ex: 22
remote_user: ${{ secrets.REMOTE_USER }} # ex: ubuntu
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}
```
## Inputs
- `debug`* - Whether to enable debug output. ("true" / "false") - Default: "false"
@@ -53,20 +90,10 @@ 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.0)
### Release channels:
| Version | Purpose | Immutable |
| ------- | ------------------ | ------------------ |
| ``v8`` | latest release (pointer to 8.x.x) | no, points to latest MINOR,PATCH |
| 8.0.0 | latest major release | yes |
| 7.1.0 | previous release | yes |
Check [SECURITY.md](SECURITY.md) for support cycles.
## Example usage
For better **security** always use secrets for remote_host, remote_port, remote_user and remote_path inputs.
Simple:
```yml
@@ -86,13 +113,14 @@ jobs:
with:
switches: -avzr --delete
path: src/
remote_path: /var/www/html/
remote_host: example.com
remote_user: debian
remote_path: ${{ secrets.REMOTE_PATH }} # ex: /var/www/html/
remote_host: ${{ secrets.REMOTE_HOST }} # ex: example.com
remote_port: ${{ secrets.REMOTE_PORT }} # ex: 22
remote_user: ${{ secrets.REMOTE_USER }} # ex: ubuntu
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}
```
Advanced:
Advanced (with filters etc):
```yml
jobs:
@@ -105,30 +133,10 @@ jobs:
with:
switches: -avzr --delete --exclude="" --include="" --filter=""
path: src/
remote_path: /var/www/html/
remote_host: example.com
remote_port: 5555
remote_user: debian
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}
```
For better **security**, I suggest you create additional secrets for remote_host, remote_port, remote_user and remote_path inputs.
```yml
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: rsync deployments
uses: burnett01/rsync-deployments@v8
with:
switches: -avzr --delete
path: src/
remote_path: ${{ secrets.REMOTE_PATH }}
remote_host: ${{ secrets.REMOTE_HOST }}
remote_port: ${{ secrets.REMOTE_PORT }}
remote_user: ${{ secrets.REMOTE_USER }}
remote_path: ${{ secrets.REMOTE_PATH }} # ex: /var/www/html/
remote_host: ${{ secrets.REMOTE_HOST }} # ex: example.com
remote_port: ${{ secrets.REMOTE_PORT }} # ex: 22
remote_user: ${{ secrets.REMOTE_USER }} # ex: ubuntu
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}
```
@@ -145,10 +153,10 @@ jobs:
with:
switches: -avzr --delete
path: src/
remote_path: ${{ secrets.REMOTE_PATH }}
remote_host: ${{ secrets.REMOTE_HOST }}
remote_port: ${{ secrets.REMOTE_PORT }}
remote_user: ${{ secrets.REMOTE_USER }}
remote_path: ${{ secrets.REMOTE_PATH }} # ex: /var/www/html/
remote_host: ${{ secrets.REMOTE_HOST }} # ex: example.com
remote_port: ${{ secrets.REMOTE_PORT }} # ex: 22
remote_user: ${{ secrets.REMOTE_USER }} # ex: ubuntu
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}
remote_key_pass: ${{ secrets.REMOTE_PRIVATE_KEY_PASS }}
```
@@ -172,10 +180,10 @@ jobs:
switches: -avzr --delete
legacy_allow_rsa_hostkeys: "true"
path: src/
remote_path: ${{ secrets.REMOTE_PATH }}
remote_host: ${{ secrets.REMOTE_HOST }}
remote_port: ${{ secrets.REMOTE_PORT }}
remote_user: ${{ secrets.REMOTE_USER }}
remote_path: ${{ secrets.REMOTE_PATH }} # ex: /var/www/html/
remote_host: ${{ secrets.REMOTE_HOST }} # ex: example.com
remote_port: ${{ secrets.REMOTE_PORT }} # ex: 22
remote_user: ${{ secrets.REMOTE_USER }} # ex: ubuntu
remote_key: ${{ secrets.REMOTE_PRIVATE_KEY }}
```
@@ -277,6 +285,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:
@@ -358,7 +372,7 @@ Please note that version 1.0 has reached end of life state.
## Acknowledgements
+ This project is a fork of [Contention/rsync-deployments](https://github.com/Contention/rsync-deployments)
+ Base image [JoshPiper/rsync-docker](https://github.com/JoshPiper/rsync-docker)
+ docker-rsync [JoshPiper/rsync-docker](https://github.com/JoshPiper/rsync-docker)
---
+16 -13
View File
@@ -6,19 +6,22 @@ The Docker image and code quality are regularly checked for vulnerabilities and
The following versions are currently being supported with security updates:
| Version | Supported | Rsync version | Alpine version |
| ------- | ------------------ | ------------------ | ------------------ |
| 8.0.0 | :white_check_mark: | >= 3.4.1-r1 | 3.23.0 |
| 7.1.0 | :white_check_mark: | >= 3.4.1-r0 | 3.22.1 |
| 7.0.2 | :warning: DEPRECATED | >= 3.4.0-r0 | 3.22.1 |
| 7.0.1 | :x: EOL | < 3.4.0 | 3.22.1 |
| 7.0.0 | :x: EOL | < 3.4.0| 3.19.1 |
| 6.x | :x: EOL |< 3.4.0| 3.17.2 |
| 5.x | :x: EOL |< 3.4.0| 3.11 - 3.14.1 - 3.15 - 3.16 - 3.17.2 |
| 4.x | :x: EOL |< 3.4.0| 3.11 |
| 3.0 | :x: EOL |< 3.4.0| N/A |
| 2.0 | :x: EOL |< 3.4.0| Ubuntu |
| 1.0 | :x: EOL |< 3.4.0| Ubuntu |
| Version | Supported | Rsync version | Alpine version | Support Until |
| ------- | ------------------ | ------------------ | ------------------ | ------------------ |
| (``v8``) 8.0.3 | :white_check_mark: | >= 3.4.1-r1 | 3.23.2 | LTS (2026-*) |
| 8.0.2 | :white_check_mark: | >= 3.4.1-r1 | 3.23.0 | LTS (2026-*) |
| 8.0.1 | :white_check_mark: | >= 3.4.1-r1 | 3.23.0 | Apr, 1st 2026 |
| 8.0.0 | :x: EOL (due to regression #90) | >= 3.4.1-r1 | 3.23.0 | † Dec, 6th 2025 |
| 7.1.0 | :warning: DEPRECATED | >= 3.4.1-r0 | 3.22.1 | June, 1st 2026 ([deprecation notice](https://github.com/Burnett01/rsync-deployments/discussions/96)) |
| 7.0.2 | :warning: DEPRECATED | >= 3.4.0-r0 | 3.22.1 | June, 1st 2026 ([deprecation notice](https://github.com/Burnett01/rsync-deployments/discussions/96)) |
| 7.0.1 | :x: EOL | < 3.4.0 | 3.22.1 | † Dec, 6th 2025 |
| 7.0.0 | :x: EOL | < 3.4.0| 3.19.1 | † Dec, 6th 2025 |
| 6.x | :x: EOL |< 3.4.0| 3.17.2 | † 2024 |
| 5.x | :x: EOL |< 3.4.0| 3.11 - 3.14.1 - 3.15 - 3.16 - 3.17.2 | † 2024 |
| 4.x | :x: EOL |< 3.4.0| 3.11 | † |
| 3.0 | :x: EOL |< 3.4.0| N/A | † |
| 2.0 | :x: EOL |< 3.4.0| Ubuntu | † |
| 1.0 | :x: EOL |< 3.4.0| Ubuntu | † |
### Terminology
+1 -1
View File
@@ -2,4 +2,4 @@
set -eu
printf '%s\n' "$@" >> $HOME/.ssh/known_hosts
echo "$@" >> $HOME/.ssh/known_hosts
+4 -1
View File
@@ -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
+3 -1
View File
@@ -2,4 +2,6 @@
set -eu
mkdir -m 700 $HOME/.ssh
if [ ! -d "$HOME/.ssh" ]; then
mkdir -m 700 $HOME/.ssh
fi
+1 -1
View File
@@ -17,7 +17,7 @@ source hosts-init
# Start the SSH agent and load key.
source agent-start "$GITHUB_ACTION"
printf '%s' "$INPUT_REMOTE_KEY" | SSH_PASS="${INPUT_REMOTE_KEY_PASS}" agent-add >/dev/null 2>&1
echo "$INPUT_REMOTE_KEY" | SSH_PASS="$INPUT_REMOTE_KEY_PASS" agent-add
# Variables.
LEGACY_RSA_HOSTKEYS=""