main
不忘初心 2 years ago
parent a64e77eb53
commit 2369498db2

@ -1,11 +1,6 @@
# Container image that runs your code # Container image that runs your code
FROM alpine:3.12 FROM alpine:3.12
# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
# Make sure to make you entrypoint.sh file executable:
RUN chmod +x entrypoint.sh
RUN apk update \ RUN apk update \
&& apk add --no-cache wget \ && 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 \ && wget -O upx.tar.gz http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_x86_64.tar.gz \
@ -13,5 +8,3 @@ RUN apk update \
&& mv upx /usr/local/bin/upx \ && mv upx /usr/local/bin/upx \
&& chmod +x /usr/local/bin/upx && chmod +x /usr/local/bin/upx
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]

@ -2,13 +2,13 @@ name: 'upyun-upx-action'
author: 'YaoKun <yaokun@bwcxtech.com>' author: 'YaoKun <yaokun@bwcxtech.com>'
description: 'Deploy your files to upyun using upyun-upx.' description: 'Deploy your files to upyun using upyun-upx.'
inputs: inputs:
up_bucket: UP_BUCKET:
description: '服务名' description: '服务名'
required: true required: true
up_operator: UP_OPERATOR:
description: '操作员' description: '操作员'
required: true required: true
up_operator_password: UP_OPERATOR_PASSWORD:
description: '操作员密码' description: '操作员密码'
required: true required: true
local_path: local_path:

@ -1,13 +0,0 @@
#!/bin/sh -l
#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
upx login $1 $2 $3
upx sync $4 $5 --delete
upx logout
echo 'Deploy Success'
exit 0
Loading…
Cancel
Save