From 0cf41579d763f857cedb7185616767f74c1515c0 Mon Sep 17 00:00:00 2001 From: qxa Date: Tue, 5 Mar 2024 14:44:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 12 ++++++++++++ action.yaml | 20 ++++++++++++++++++++ entrypoint.sh | 7 +++++++ 3 files changed, 39 insertions(+) create mode 100644 Dockerfile create mode 100644 action.yaml create mode 100644 entrypoint.sh 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