不忘初心 2 years ago
parent 3ce378a753
commit e305fa84c3

@ -1,8 +1,13 @@
# Container image that runs your code
FROM alpine:3.12
RUN apk update \
&& apk add --no-cache wget \
&& wget -O upx.tar.gz http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_x86_64.tar.gz \
&& tar -zxf upx.tar.gz \
&& chmod +x upx
# Container image that runs your code
FROM alpine:3.12
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]

@ -11,11 +11,11 @@ inputs:
UP_OPERATOR_PASSWORD:
description: '操作员密码'
required: true
local_path:
LOCAL_PATH:
description: 'will put all file under this path'
required: true
default: ./public/*
remote_path:
REMOTE_PATH:
description: 'files will copy to under remote_path'
required: true
default: /

@ -0,0 +1,15 @@
#!/bin/sh -l
apk update \
&& apk add --no-cache wget \
&& wget -O upx.tar.gz http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_x86_64.tar.gz \
&& tar -zxf upx.tar.gz \
&& chmod +x upx \
&& mv upx /usr/local/bin/upx
### 执行upx upload
upx login "${BUCKET_NAME}" "${UPX_NAME}" "${UPX_PASSWORD}"
echo "start upx upload!"
upx sync ${LOCAL_PATH} ${REMOTE_PATH} --delete
echo "upx upload successful!"
upx logout
Loading…
Cancel
Save