mirror of
https://github.com/Burnett01/rsync-deployments.git
synced 2026-09-19 21:25:22 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ce5f41df10 | |||
| 2f1450c0da | |||
| 09d0f6ee87 | |||
| 66257cad6b | |||
| 27212fc826 | |||
| dc0d5d44c4 | |||
| cccc35d762 | |||
| 2ad5f95a8a | |||
| 115573f97b | |||
| 7659d600d8 | |||
| 81be6cf6d7 | |||
| 178d2ea600 | |||
| 241aa321a8 | |||
| 80e4fa792e | |||
| 0c902521b8 |
@@ -0,0 +1 @@
|
||||
github: [burnett01]
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.23.0@sha256:51183f2cfa6320055da30872f211093f9ff1d3cf06f39a0bdb212314c5dc7375 AS base
|
||||
FROM alpine:3.23.4@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11 AS base
|
||||
|
||||
RUN apk update && apk add --no-cache --upgrade rsync openssh openssl busybox
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-2022 Contention
|
||||
Copyright (c) 2019-2025 Joshua Piper (Dr Internet)
|
||||
Copyright (c) 2019-2025 Burnett01
|
||||
Copyright (c) 2019-2026 Joshua Piper (Dr Internet)
|
||||
Copyright (c) 2019-2026 Burnett01
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -10,13 +10,48 @@ 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.4** (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.4](https://www.alpinelinux.org/posts/Alpine-3.20.10-3.21.7-3.22.4-3.23.4-released.html)
|
||||
Rsync version: [3.4.1-r1](https://download.samba.org/pub/rsync/NEWS#3.4.1)
|
||||
|
||||
## Current Version: v8 (8.0.5)
|
||||
|
||||
### Release channels:
|
||||
|
||||
| Version | Purpose | Immutable |
|
||||
| ------- | ------------------ | ------------------ |
|
||||
| ``v8`` (recommended) | latest MAJOR (pointer to 8.MINOR.PATCH) | no |
|
||||
| 8.0.5 | latest MAJOR+MINOR+PATCH | 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 +88,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.1)
|
||||
|
||||
### 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 |
|
||||
| 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 +111,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 +131,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 +151,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 +178,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,14 +283,44 @@ sudo apk add rsync
|
||||
|
||||
## Versions
|
||||
|
||||
## Version 7.1.0
|
||||
## Version 8.0.4
|
||||
|
||||
Check here:
|
||||
|
||||
- https://github.com/Burnett01/rsync-deployments/tree/8.0.4 (alpine 3.23.3)
|
||||
|
||||
## Version 8.0.3
|
||||
|
||||
Check here:
|
||||
|
||||
- https://github.com/Burnett01/rsync-deployments/tree/8.0.3 (alpine 3.23.2)
|
||||
|
||||
## Version 8.0.2
|
||||
|
||||
Check here:
|
||||
|
||||
- https://github.com/Burnett01/rsync-deployments/tree/8.0.2 (alpine 3.23.0)
|
||||
|
||||
## Version 8.0.1 (EOL)
|
||||
|
||||
Check here:
|
||||
|
||||
- https://github.com/Burnett01/rsync-deployments/tree/8.0.1 (alpine 3.23.0)
|
||||
|
||||
## 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 (EOL)
|
||||
|
||||
Check here:
|
||||
|
||||
- https://github.com/Burnett01/rsync-deployments/tree/7.1.0 (alpine 3.22.1)
|
||||
|
||||
|
||||
## Version 7.0.2 (DEPRECATED)
|
||||
## Version 7.0.2 (EOL)
|
||||
|
||||
Check here:
|
||||
|
||||
@@ -358,7 +394,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)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+18
-14
@@ -6,20 +6,24 @@ 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.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 |
|
||||
| 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.5 | :white_check_mark: | >= 3.4.1-r1 | 3.23.4 | LTS (2026-*) |
|
||||
| 8.0.4 | :white_check_mark: | >= 3.4.1-r1 | 3.23.3 | LTS (2026) |
|
||||
| 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 | :x: EOL | >= 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 | :x: EOL | >= 3.4.1-r0 | 3.22.1 | † June, 1st 2026 ([deprecation notice](https://github.com/Burnett01/rsync-deployments/discussions/96)) |
|
||||
| 7.0.2 | :x: EOL | >= 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
@@ -1,5 +1,5 @@
|
||||
name: 'Rsync Deployments Action'
|
||||
description: 'GitHub Action for deploying code via rsync over ssh'
|
||||
description: 'GitHub Action for deploying code via rsync over ssh securely - used by 5k+ workflows!'
|
||||
author: 'Burnett01'
|
||||
inputs:
|
||||
switches:
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
set -eu
|
||||
|
||||
printf '%s\n' "$@" >> $HOME/.ssh/known_hosts
|
||||
echo "$@" >> $HOME/.ssh/known_hosts
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
set -eu
|
||||
|
||||
mkdir -m 700 $HOME/.ssh
|
||||
if [ ! -d "$HOME/.ssh" ]; then
|
||||
mkdir -m 700 $HOME/.ssh
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user