commit d3ec296d1eb0cefd547e2b81b6ff63024392fe01 Author: 不忘初心 <1624717079@qq.com> Date: Wed Aug 24 09:31:57 2022 +0800 first diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..073d3ae --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM alpine:3.12 + +RUN apk --no-cache add wget curl bash + +RUN 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 \ + && mv upx /usr/local/bin/upx \ + && chmod +x /usr/local/bin/upx + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..63fcad5 --- /dev/null +++ b/action.yml @@ -0,0 +1,19 @@ +name: 'upyun-upx-action' +author: 'YaoKun ' +description: 'Deploy your files to upyun using upyun-upx.' +inputs: + UP_BUCKET: + description: '服务名' + required: true + UP_OPERATOR: + description: '操作员' + required: true + UP_OPERATOR_PASSWORD: + description: '操作员密码' + required: true +runs: + using: 'docker' + image: 'Dockerfile' +branding: + color: 'blue' + icon: 'upload-cloud' diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..44f7ed3 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +upx login ${{ secrets.UP_BUCKET }} ${{ secrets.UP_OPERATOR }} ${{ secrets.UP_OPERATOR_PASSWORD }}