mirror of
https://gitee.com/jiulinxiri/ssh-scp-deploy.git
synced 2025-09-10 10:19:49 +08:00
Merge pull request #6 from marcodallasanta/development
Fixed entrypoint.sh
This commit is contained in:
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -12,9 +12,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- uses: underscore69/ssh-scp-deploy@main
|
||||
- uses: marcodallasanta/ssh-scp-deploy@main
|
||||
with:
|
||||
local: "./"
|
||||
local: "CHANGELOG.md"
|
||||
remote: "~/"
|
||||
host: ${{secrets.HOST}}
|
||||
user: ${{secrets.USER}}
|
||||
|
@@ -1,6 +1,11 @@
|
||||
# [Unreleased]
|
||||
|
||||
|
||||
## [v1.0.2] - 2020-12-21
|
||||
|
||||
### Fixed
|
||||
- Dockerfile used to copy just entrypoint.sh.
|
||||
|
||||
## [v1.0.1] - 2020-12-21
|
||||
|
||||
### Fixed
|
||||
|
@@ -7,7 +7,6 @@ RUN apk update && \
|
||||
bash
|
||||
|
||||
COPY LICENSE README.md /
|
||||
|
||||
COPY *.sh ./
|
||||
COPY entrypoint.sh with_key.sh with_pass.sh /
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@@ -1,15 +1,17 @@
|
||||
#!/bin/bash
|
||||
PASSWORD=${INPUT_PASSWORD}
|
||||
KEY=${INPUT_KEY}
|
||||
if [ -z "$PRE_UPLOAD" and "$PASSWORD"]; then
|
||||
|
||||
PASSWORD=${INPUT_PASSWORD};
|
||||
KEY=${INPUT_KEY};
|
||||
|
||||
if [ -z "$PRE_UPLOAD" ] && [ "$PASSWORD" ]; then
|
||||
echo "🔑 Please provide at least a key or a password...";
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
if [[ ! -z "$KEY" ]]; then
|
||||
if [[ -n "$KEY" ]]; then
|
||||
echo "🔑 Using key file...";
|
||||
. with_key.sh;
|
||||
source /with_key.sh;
|
||||
else
|
||||
echo "🔑 Using password...";
|
||||
. with_pass.sh;
|
||||
source /with_pass.sh;
|
||||
fi
|
Reference in New Issue
Block a user