111
parent
3ce378a753
commit
e305fa84c3
@ -1,8 +1,13 @@
|
|||||||
# Container image that runs your code
|
# Container image that runs your code
|
||||||
FROM alpine:3.12
|
FROM alpine:3.12
|
||||||
|
|
||||||
RUN apk update \
|
# Container image that runs your code
|
||||||
&& apk add --no-cache wget \
|
FROM alpine:3.12
|
||||||
&& 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 \
|
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||||
&& chmod +x upx
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
# Code file to execute when the docker container starts up (`entrypoint.sh`)
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh -l
|
||||||
|
|
||||||
|
apk update \
|
||||||
|
&& 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 \
|
||||||
|
&& tar -zxf upx.tar.gz \
|
||||||
|
&& chmod +x upx \
|
||||||
|
&& mv upx /usr/local/bin/upx
|
||||||
|
|
||||||
|
### 执行upx upload
|
||||||
|
upx login "${BUCKET_NAME}" "${UPX_NAME}" "${UPX_PASSWORD}"
|
||||||
|
echo "start upx upload!"
|
||||||
|
upx sync ${LOCAL_PATH} ${REMOTE_PATH} --delete
|
||||||
|
echo "upx upload successful!"
|
||||||
|
upx logout
|
Loading…
Reference in New Issue