From c7303a6bc87f4cf3bc696d1fc28e517bfaefd809 Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Tue, 25 May 2021 23:42:12 +0100 Subject: [PATCH 1/3] chore: update rsync deploy --- .gitignore | 5 +++++ Dockerfile | 14 ++++---------- entrypoint.sh | 6 +++++- 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9674d3b --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/.idea/.gitignore +/.idea/misc.xml +/.idea/modules.xml +/.idea/rsync-deploy.iml +/.idea/vcs.xml diff --git a/Dockerfile b/Dockerfile index afb6fb5..d1fdb36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,14 @@ -FROM debian:9.5-slim +FROM ubuntu:bionic RUN apt update -RUN apt -yq install rsync openssh-client +RUN apt -y install rsync openssh-client # 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 " +LABEL "maintainer"="Obinna Odirionye " ADD entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh index 8052c71..a4f44c8 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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" From 37e56df332a1a99ae3896a23200e8f7a7e20db9b Mon Sep 17 00:00:00 2001 From: nerdeveloper Date: Tue, 25 May 2021 23:48:19 +0100 Subject: [PATCH 2/3] chore: update rsync deploy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b35d70..14f1986 100644 --- a/README.md +++ b/README.md @@ -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" From af6978dd1e0ed912055af8ea680f13a2768d659d Mon Sep 17 00:00:00 2001 From: Obinna Odirionye Date: Thu, 3 Jul 2025 06:11:25 +0400 Subject: [PATCH 3/3] Upgrade Dockerfile to Ubuntu 24.04 - Upgrade from ubuntu:bionic (18.04) to ubuntu:24.04 - Consolidate RUN layers for smaller image size - Add SHELL directive for safer builds - Use --no-install-recommends for minimal installation - Clean apt cache to reduce image size - Add comprehensive labels including OCI description - Maintain same functionality with updated packages: - rsync 3.2.7 (was 3.x) - OpenSSH 9.6p1 (was 7.x) Tested and verified: - Image builds successfully (109MB) - rsync and ssh binaries work correctly - Entrypoint script functions as expected --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index d1fdb36..85405dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,16 @@ -FROM ubuntu:bionic +FROM ubuntu:24.04 -RUN apt update -RUN apt -y 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 "maintainer"="Obinna Odirionye " - +# Labels +LABEL "com.github.actions.name"="Deploy with rsync" \ + "maintainer"="Obinna Odirionye " \ + "org.opencontainers.image.description"="GitHub Action: deploy via rsync" ADD entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh