Merge pull request #6 from marcodallasanta/development

Fixed entrypoint.sh
This commit is contained in:
Marco Dalla Santa
2020-12-21 22:54:59 +01:00
committed by GitHub
4 changed files with 16 additions and 10 deletions

View File

@@ -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}}

View File

@@ -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

View File

@@ -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"]

View File

@@ -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