3 Commits

Author SHA1 Message Date
JackWhh
90843aab03 1
Signed-off-by: JackWhh <5264499+jack_whh@user.noreply.gitee.com>
2024-07-18 07:30:13 +00:00
JackWhh
6009d21da7 1
Signed-off-by: JackWhh <5264499+jack_whh@user.noreply.gitee.com>
2024-07-18 07:25:54 +00:00
JackWhh
6ed6f6ca38 1
Signed-off-by: JackWhh <5264499+jack_whh@user.noreply.gitee.com>
2024-07-18 06:21:31 +00:00
2 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
# Container image that runs your code
FROM alpine:3.13
RUN echo "http://mirrors.aliyun.com/alpine/v3.13/main" > /etc/apk/repositories
RUN echo "http://mirrors.aliyun.com/alpine/v3.13/community" >> /etc/apk/repositories
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh

View File

@@ -3,7 +3,7 @@
#set -e at the top of your script will make the script exit with an error whenever an error occurs (and is not explicitly handled)
set -eu
TEMP_SSH_PRIVATE_KEY_FILE='../private_key.pem'
TEMP_SSH_PRIVATE_KEY_FILE='../private_wdhcr.pem'
TEMP_SFTP_FILE='../sftp'
# make sure remote path is not empty
@@ -41,6 +41,7 @@ fi
# keep string format
printf "%s" "$4" >$TEMP_SSH_PRIVATE_KEY_FILE
echo "-------"
cat $TEMP_SSH_PRIVATE_KEY_FILE
# avoid Permissions too open
chmod 600 $TEMP_SSH_PRIVATE_KEY_FILE