Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.idea/.gitignore
/.idea/misc.xml
/.idea/modules.xml
/.idea/rsync-deploy.iml
/.idea/vcs.xml
25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
FROM debian:9.5-slim
FROM ubuntu:24.04

RUN apt update
RUN apt -yq install rsync openssh-client
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
rsync openssh-client \
&& rm -rf /var/lib/apt/lists/*

# Label
LABEL "com.github.actions.name"="Deploy with rsync"
LABEL "com.github.actions.description"="Deploy to a remote server using rsync over ssh"
LABEL "com.github.actions.color"="green"
LABEL "com.github.actions.icon"="truck"

LABEL "repository"="http://github.com/AEnterprise/rsync-deploy"
LABEL "homepage"="https://github.com/AEnterprise/rsync-deploy"
LABEL "maintainer"="AEnterprise <aenterprise@aenterprise.info>"

# Labels
LABEL "com.github.actions.name"="Deploy with rsync" \
"maintainer"="Obinna Odirionye <odirionye@mail.com>" \
"org.opencontainers.image.description"="GitHub Action: deploy via rsync"

ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Deploy to a remote server using rsync.
example usage to sync everything in the workspace folder:
```
- name: deploy to server
uses: AEnterprise/rsync-deploy@v1.0
uses: Phillips-Cohen-Associates-Ltd/rsync-deploy@v2
env:
DEPLOY_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-e -c -r --delete"
Expand Down
6 changes: 5 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/bin/bash
set -eu

SSHPATH="$HOME/.ssh"

mkdir -p "$SSHPATH"

echo "$DEPLOY_KEY" > "$SSHPATH/key"

chmod 600 "$SSHPATH/key"

SERVER_DEPLOY_STRING="$USERNAME@$SERVER_IP:$SERVER_DESTINATION"

# sync it up"
sh -c "rsync $ARGS -e 'ssh -i $SSHPATH/key -o StrictHostKeyChecking=no -p $SERVER_PORT' $GITHUB_WORKSPACE/$FOLDER $SERVER_DEPLOY_STRING"