From d3ec296d1eb0cefd547e2b81b6ff63024392fe01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=BF=98=E5=88=9D=E5=BF=83?= <1624717079@qq.com> Date: Wed, 24 Aug 2022 09:31:57 +0800 Subject: [PATCH] first --- Dockerfile | 12 ++++++++++++ action.yml | 19 +++++++++++++++++++ entrypoint.sh | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 Dockerfile create mode 100644 action.yml create mode 100644 entrypoint.sh 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 }}