Build commit

This commit is contained in:
Sebastian Rueda 2022-04-17 23:18:15 -05:00
commit 6e2f024bdc
4 changed files with 69 additions and 0 deletions

19
.github/workflows/cicd.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Super SCP Action
on: [push]
jobs:
scp:
name: SCP Copy
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: Copy using key
id: key-job
uses: srueda99/scp-action@v1
with:
port: 22
host:
target: "/home"
username:
key:

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
# Runs on Alpine container, latest version.
FROM alpine
# Copy the script to the home directory of the container.
COPY entrypoint.sh /home/entrypoint.sh
# Grant executable permission on the script.
RUN ["chmod", "+x", "/home/entrypoint.sh"]
# Runs the script.
ENTRYPOINT [ "/entrypoint.sh" ]

40
action.yml Normal file
View File

@ -0,0 +1,40 @@
name: 'SCP Action'
description: 'Copies the files from your repository to a remote host using SCP'
author: 'Sebastian Rueda'
inputs:
# $1
port:
description: 'Port for SCP'
default: 22
# $2
host:
description: 'IP Address or DNS of your target host'
# $3
target:
description: 'Destination route folder'
# $4
username:
description: 'User for remote connection'
# $5
password:
description: 'Password for the user'
# $6
key:
description: 'Private SSH key'
# $7
passphrase:
description: 'Passphrase for SSH key'
outputs:
time:
description: 'Returns the result'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.port }}
- ${{ inputs.host }}
- ${{ inputs.target }}
- ${{ inputs.username }}
- ${{ inputs.password }}
- ${{ inputs.key }}
- ${{ inputs.passphrase }}

2
entrypoint.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh -l