| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- name: Renew Certificate
- on:
- # push:
- # branches: [ master ]
- # pull_request:
- # branches: [ master ]
- workflow_dispatch:
- schedule:
- - cron: "0 23 */1 */1 *" # every day 23:00
- # - cron: "0 23 20 */2 *" # every 2 months 20 23:00
- jobs:
- run-script:
-
- runs-on: ubuntu-latest
-
- steps:
-
- # - name: Set Variables
- # run: |
- # echo "DNSCRYPT_PROXY_VERSION=$(curl -fsSL https://api.github.com/repos/dnscrypt/dnscrypt-proxy/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
- # echo "CADDY_VERSION=$(curl -fsSL https://api.github.com/repos/caddyserver/caddy/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
- # echo "V2RAY_VERSION=$(curl -fsSL https://api.github.com/repos/v2fly/v2ray-core/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
- # echo "XRAY_VERSION=$(curl -fsSL https://api.github.com/repos/xtls/xray-core/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
- # echo "NAIVE_VERSION=$(curl -fsSL https://api.github.com/repos/klzgrad/naiveproxy/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
- # echo "FRP_VERSION=$(curl -fsSL https://api.github.com/repos/fatedier/frp/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
- # echo "SYNCTHING_VERSION=$(curl -fsSL https://api.github.com/repos/syncthing/syncthing/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
- # echo "KCPTUN_VERSION=$(curl -fsSL https://api.github.com/repos/xtaci/kcptun/releases/latest | grep '"tag_name":' | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/v//g;s/,//g;s/ //g')" >> $GITHUB_ENV
- # echo "UDP2RAW_VERSION=$(curl -fsSL https://api.github.com/repos/wangyu-/udp2raw-tunnel/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
- # echo "TINYVPN_VERSION=$(curl -fsSL https://api.github.com/repos/wangyu-/tinyfecvpn/releases/latest | grep '"tag_name":' | head -n 1 | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_ENV
- # cat $GITHUB_ENV
- # shell: bash
- # - name: Set timezone
- # uses: szenius/[email protected]
- # with:
- # timezoneLinux: "Asia/Shanghai"
- - name: Renew Certificate
- uses: appleboy/ssh-action@master
- with:
- host: ${{ secrets.VPS_HKG_HOSTNAME }}
- username: ${{ secrets.VPS_USERNAME }}
- key: ${{ secrets.VPS_KEY }}
- port: ${{ secrets.VPS_PORT }}
- # fingerprint: ${{ secrets.VPS_FINGERPRINT }}
- script_stop: true
- # TEST
- # script: |
- # whoami
- # ls -al
- script: |
- cd /root/devops/docker/common/lego
- bash docker_run.sh
|