]> git.proxmox.com Git - mirror_acme.sh.git/blob - .github/workflows/LetsEncrypt.yml
merge second rebase against upstream/master
[mirror_acme.sh.git] / .github / workflows / LetsEncrypt.yml
1 name: LetsEncrypt
2 on:
3 push:
4 branches:
5 - '*'
6 paths:
7 - '**.sh'
8 - '**.yml'
9 pull_request:
10 branches:
11 - dev
12 paths:
13 - '**.sh'
14
15
16 jobs:
17 CheckToken:
18 runs-on: ubuntu-latest
19 outputs:
20 hasToken: ${{ steps.step_one.outputs.hasToken }}
21 env:
22 NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
23 steps:
24 - name: Set the value
25 id: step_one
26 run: |
27 if [ "$NGROK_TOKEN" ] ; then
28 echo "::set-output name=hasToken::true"
29 else
30 echo "::set-output name=hasToken::false"
31 fi
32 - name: Check the value
33 run: echo ${{ steps.step_one.outputs.hasToken }}
34
35 Ubuntu:
36 runs-on: ubuntu-latest
37 needs: CheckToken
38 if: "contains(needs.CheckToken.outputs.hasToken, 'true')"
39 env:
40 NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
41 TEST_LOCAL: 1
42 steps:
43 - uses: actions/checkout@v2
44 - name: Install tools
45 run: sudo apt-get install -y socat
46 - name: Clone acmetest
47 run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
48 - name: Run acmetest
49 run: cd ../acmetest && sudo TEST_LOCAL="$TEST_LOCAL" NGROK_TOKEN="$NGROK_TOKEN" ./letest.sh
50
51 MacOS:
52 runs-on: macos-latest
53 needs: Ubuntu
54 env:
55 NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
56 TEST_LOCAL: 1
57 steps:
58 - uses: actions/checkout@v2
59 - name: Install tools
60 run: brew update && brew install socat;
61 - name: Clone acmetest
62 run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
63 - name: Run acmetest
64 run: cd ../acmetest && sudo TEST_LOCAL="$TEST_LOCAL" NGROK_TOKEN="$NGROK_TOKEN" ./letest.sh
65
66 Windows:
67 runs-on: windows-latest
68 needs: MacOS
69 env:
70 NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
71 TEST_LOCAL: 1
72 #The 80 port is used by Windows server, we have to use a custom port, ngrok will also use this port.
73 Le_HTTPPort: 8888
74 steps:
75 - uses: actions/checkout@v2
76 - name: Install cygwin base packages with chocolatey
77 run: |
78 choco config get cacheLocation
79 choco install --no-progress cygwin
80 shell: cmd
81 - name: Install cygwin additional packages
82 run: |
83 C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P socat,curl,cron,unzip,git
84 shell: cmd
85 - name: Set ENV
86 run: |
87 echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin'
88 - name: Clone acmetest
89 shell: cmd
90 run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/ && sed -i 's/\r//g' acmetest/acme.sh/acme.sh
91 - name: Run acmetest
92 shell: cmd
93 run: cd ../acmetest && bash.exe -c ./letest.sh
94
95