diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9bc551e..6c903d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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}} diff --git a/CHANGELOG.md b/CHANGELOG.md index b80cf54..b0af20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Dockerfile b/Dockerfile index 1e1aeef..bdc6f99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/entrypoint.sh b/entrypoint.sh index f4e9b79..cd55f05 100755 --- a/entrypoint.sh +++ b/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 \ No newline at end of file