Returns the time
This commit is contained in:
parent
b29b4d4bf6
commit
dfd2bccf3c
2
.github/workflows/cicd.yml
vendored
2
.github/workflows/cicd.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
||||
|
||||
- name: Copy using key
|
||||
id: key-job
|
||||
uses: srueda99/scp-action@v2
|
||||
uses: srueda99/scp-action@v3
|
||||
with:
|
||||
port: 22
|
||||
host: ${{ secrets.SERVER_ADDRESS }}
|
||||
|
@ -1,8 +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
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
# Grant executable permission on the script.
|
||||
RUN ["chmod", "+x", "/home/entrypoint.sh"]
|
||||
RUN ["chmod", "+x", "/entrypoint.sh"]
|
||||
# Runs the script.
|
||||
ENTRYPOINT [ "/home/entrypoint.sh" ]
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
10
README.md
10
README.md
@ -23,7 +23,7 @@ Use Github secrets to give these parameters.
|
||||
**With password**
|
||||
```
|
||||
name: Copy using password
|
||||
uses: srueda99/scp-action@v2
|
||||
uses: srueda99/scp-action@v3
|
||||
with:
|
||||
port: 22
|
||||
host: ${{ secrets.SERVER_ADDRESS }}
|
||||
@ -35,7 +35,7 @@ with:
|
||||
**With key**
|
||||
```
|
||||
name: Copy using key
|
||||
uses: srueda99/scp-action@v2
|
||||
uses: srueda99/scp-action@v3
|
||||
with:
|
||||
port: 22
|
||||
host: ${{ secrets.SERVER_ADDRESS }}
|
||||
@ -47,11 +47,11 @@ with:
|
||||
**With origin folder**
|
||||
```
|
||||
name: Copy using password
|
||||
uses: srueda99/scp-action@v2
|
||||
uses: srueda99/scp-action@v3
|
||||
with:
|
||||
port: 22
|
||||
host: ${{ secrets.SERVER_ADDRESS }}
|
||||
origin: "/home/*"
|
||||
origin: "./*"
|
||||
destination: "/home/${{ secrets.SERVER_USERNAME }}/"
|
||||
username: ${{ secrets.SERVER_USERNAME }}
|
||||
password: ${{ secrets.SERVER_PASSWORD }}
|
||||
@ -60,7 +60,7 @@ with:
|
||||
**With passphrase**
|
||||
```
|
||||
name: Copy using key
|
||||
uses: srueda99/scp-action@v2
|
||||
uses: srueda99/scp-action@v3
|
||||
with:
|
||||
port: 22
|
||||
host: ${{ secrets.SERVER_ADDRESS }}
|
||||
|
@ -30,7 +30,7 @@ inputs:
|
||||
description: 'Passphrase for SSH key'
|
||||
outputs:
|
||||
time:
|
||||
description: 'Returns the result'
|
||||
description: 'Returns the time when the script ran'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
|
@ -14,4 +14,8 @@ else
|
||||
# Runs the SCP command
|
||||
sshpass -p $INPUT_PASSWORD scp -P $INPUT_PORT -o StrictHostKeyChecking=no $INPUT_ORIGIN "$INPUT_USERNAME"@"$INPUT_HOST":"$INPUT_DESTINATION"
|
||||
fi
|
||||
echo "Files successfully copied"
|
||||
time=$(date)
|
||||
echo "-----------------------------"
|
||||
echo "| Files successfully copied |"
|
||||
echo "-----------------------------"
|
||||
echo "::set-output name=time::$time"
|
Loading…
Reference in New Issue
Block a user