111
parent
d3ec296d1e
commit
3f8a17f502
@ -1,12 +1,17 @@
|
||||
# Container image that runs your code
|
||||
FROM alpine:3.12
|
||||
|
||||
RUN apk --no-cache add wget curl bash
|
||||
# Copies your code file from your action repository to the filesystem path `/` of the container
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
# Make sure to make you entrypoint.sh file executable:
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
RUN wget -O upx.tar.gz http://collection.b0.upaiyun.com/softwares/upx/upx_0.3.6_linux_x86_64.tar.gz \
|
||||
RUN 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 \
|
||||
&& mv upx /usr/local/bin/upx \
|
||||
&& chmod +x /usr/local/bin/upx
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Code file to execute when the docker container starts up (`entrypoint.sh`)
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
@ -1,3 +1,13 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh -l
|
||||
|
||||
upx login ${{ secrets.UP_BUCKET }} ${{ secrets.UP_OPERATOR }} ${{ secrets.UP_OPERATOR_PASSWORD }}
|
||||
#set -e at the top of your script will make the script exit with an error whenever an error occurs (and is not explicitly handled)
|
||||
set -eu
|
||||
|
||||
upx login $1 $2 $3
|
||||
|
||||
upx sync $4 $5 --delete
|
||||
|
||||
upx logout
|
||||
|
||||
echo 'Deploy Success'
|
||||
exit 0
|
Loading…
Reference in New Issue