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