commit 0cf41579d763f857cedb7185616767f74c1515c0 Author: qxa Date: Tue Mar 5 14:44:26 2024 +0800 上传文件至 / diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2fa9e1d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM alpine + +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories + +RUN apk update +RUN apk add zip + +COPY entrypoint.sh /bin/entrypoint.sh + +RUN chmod +x /bin/entrypoint.sh + +ENTRYPOINT /bin/entrypoint.sh diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..8f1d59b --- /dev/null +++ b/action.yaml @@ -0,0 +1,20 @@ +name: zip +description: zip +author: qxa + +inputs: + work_space: + description: work space + required: false + default: . + src: + description: src path + required: false + default: . + target: + description: 输出文件 + required: true + +runs: + using: docker + image: Dockerfile diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..85a3292 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,7 @@ +env + +cd $INPUT_WORK_SPACE + +zip -r $INPUT_TARGET $INPUT_SRC + +ls -al