diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 5471ac1..e20e1d3 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -5,8 +5,17 @@ jobs: Docusaurus build and Server deploy: runs-on: ubuntu-latest steps: - - name: Check out dockerfiles. - uses: actions/checkout@v4 + - name: Set up SSH + run: | + mkdir -p ~/.ssh/ + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + ssh-keyscan -t ed25519 -p 22022 frp-by1.wwvvww.cn >> ~/.ssh/known_hosts + - name: Clone repository + run: | + echo "git clone --depth 1 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git" + git clone --depth 1 --branch=${GITHUB_REF##*/} ssh://git@frp-by1.wwvvww.cn:22022/${{ gitea.repository }}.git . + git checkout ${GITHUB_SHA} - name: Notify-Start if: ${{ always() }} run: | diff --git a/wwooww_frpc.dockerfile b/wwooww_frpc.dockerfile new file mode 100644 index 0000000..07276ba --- /dev/null +++ b/wwooww_frpc.dockerfile @@ -0,0 +1,28 @@ +FROM amd64/alpine:3.18 + +LABEL maintainer="amass <168062547@qq.com>" + +ENV FRP_VERSION 0.49.0 + +RUN apk add openssl curl ca-certificates \ + && wget 'http://openresty.org/package/admin@openresty.com-5ea678a6.rsa.pub' \ + && mv 'admin@openresty.com-5ea678a6.rsa.pub' /etc/apk/keys/ \ + && . /etc/os-release \ + && MAJOR_VER=`echo $VERSION_ID | sed 's/\.[0-9]\+$//'` \ + && echo "http://openresty.org/package/alpine/v$MAJOR_VER/main" | tee -a /etc/apk/repositories \ + && apk update \ + && apk add openresty openresty-resty openresty-opm \ + && opm get bungle/lua-resty-session + +RUN cd /root \ + && wget --no-check-certificate -c https://github.com/fatedier/frp/releases/download/v${FRP_VERSION}/frp_${FRP_VERSION}_linux_amd64.tar.gz \ + && tar zxvf frp_${FRP_VERSION}_linux_amd64.tar.gz \ + && cd frp_${FRP_VERSION}_linux_amd64/ \ + && cp frpc /usr/bin/ \ + && mkdir -p /etc/frp \ + && cp frpc.toml /etc/frp \ + && cd /root \ + && rm frp_${FRP_VERSION}_linux_amd64.tar.gz \ + && rm -rf frp_${FRP_VERSION}_linux_amd64/ + +ENTRYPOINT if [ -d /app ]; then cd /app && openresty -p /app; fi; /usr/bin/frpc -c /etc/frp/frpc.toml