You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

254 lines
9.4 KiB

4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
  1. name: DNS
  2. on:
  3. push:
  4. paths:
  5. - 'dnsapi/*.sh'
  6. - '.github/workflows/DNS.yml'
  7. pull_request:
  8. branches:
  9. - 'dev'
  10. paths:
  11. - 'dnsapi/*.sh'
  12. - '.github/workflows/DNS.yml'
  13. jobs:
  14. CheckToken:
  15. runs-on: ubuntu-latest
  16. outputs:
  17. hasToken: ${{ steps.step_one.outputs.hasToken }}
  18. steps:
  19. - name: Set the value
  20. id: step_one
  21. run: |
  22. if [ "${{secrets.TokenName1}}" ] ; then
  23. echo "::set-output name=hasToken::true"
  24. else
  25. echo "::set-output name=hasToken::false"
  26. fi
  27. - name: Check the value
  28. run: echo ${{ steps.step_one.outputs.hasToken }}
  29. Fail:
  30. runs-on: ubuntu-latest
  31. needs: CheckToken
  32. if: "contains(needs.CheckToken.outputs.hasToken, 'false')"
  33. steps:
  34. - name: "Read this: https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test"
  35. run: |
  36. echo "Read this: https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test"
  37. if [ "${{github.actor}}" != "Neilpang" ]; then
  38. false
  39. fi
  40. Docker:
  41. runs-on: ubuntu-latest
  42. needs: CheckToken
  43. if: "contains(needs.CheckToken.outputs.hasToken, 'true')"
  44. env:
  45. TEST_DNS : ${{ secrets.TEST_DNS }}
  46. TestingDomain: ${{ secrets.TestingDomain }}
  47. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  48. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  49. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  50. CASE: le_test_dnsapi
  51. TEST_LOCAL: 1
  52. DEBUG: 1
  53. steps:
  54. - uses: actions/checkout@v2
  55. - name: Clone acmetest
  56. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  57. - name: Set env file
  58. run: |
  59. cd ../acmetest
  60. if [ "${{ secrets.TokenName1}}" ] ; then
  61. echo "${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}" >> docker.env
  62. fi
  63. if [ "${{ secrets.TokenName2}}" ] ; then
  64. echo "${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}" >> docker.env
  65. fi
  66. if [ "${{ secrets.TokenName3}}" ] ; then
  67. echo "${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}" >> docker.env
  68. fi
  69. if [ "${{ secrets.TokenName4}}" ] ; then
  70. echo "${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}" >> docker.env
  71. fi
  72. if [ "${{ secrets.TokenName5}}" ] ; then
  73. echo "${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}" >> docker.env
  74. fi
  75. echo "TEST_DNS_NO_WILDCARD" >> docker.env
  76. echo "TEST_DNS_SLEEP" >> docker.env
  77. - name: Run acmetest
  78. run: cd ../acmetest && ./rundocker.sh testall
  79. MacOS:
  80. runs-on: macos-latest
  81. needs: Docker
  82. env:
  83. TEST_DNS : ${{ secrets.TEST_DNS }}
  84. TestingDomain: ${{ secrets.TestingDomain }}
  85. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  86. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  87. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  88. CASE: le_test_dnsapi
  89. TEST_LOCAL: 1
  90. DEBUG: 1
  91. steps:
  92. - uses: actions/checkout@v2
  93. - name: Install tools
  94. run: brew install socat
  95. - name: Clone acmetest
  96. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  97. - name: Run acmetest
  98. run: |
  99. if [ "${{ secrets.TokenName1}}" ] ; then
  100. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  101. fi
  102. if [ "${{ secrets.TokenName2}}" ] ; then
  103. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  104. fi
  105. if [ "${{ secrets.TokenName3}}" ] ; then
  106. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  107. fi
  108. if [ "${{ secrets.TokenName4}}" ] ; then
  109. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  110. fi
  111. if [ "${{ secrets.TokenName5}}" ] ; then
  112. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  113. fi
  114. cd ../acmetest
  115. ./letest.sh
  116. Windows:
  117. runs-on: windows-latest
  118. needs: MacOS
  119. env:
  120. TEST_DNS : ${{ secrets.TEST_DNS }}
  121. TestingDomain: ${{ secrets.TestingDomain }}
  122. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  123. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  124. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  125. CASE: le_test_dnsapi
  126. TEST_LOCAL: 1
  127. DEBUG: 1
  128. steps:
  129. - name: Set git to use LF
  130. run: |
  131. git config --global core.autocrlf false
  132. - uses: actions/checkout@v2
  133. - name: Install cygwin base packages with chocolatey
  134. run: |
  135. choco config get cacheLocation
  136. choco install --no-progress cygwin
  137. shell: cmd
  138. - name: Install cygwin additional packages
  139. run: |
  140. C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P socat,curl,cron,unzip,git
  141. shell: cmd
  142. - name: Set ENV
  143. shell: cmd
  144. run: |
  145. echo PATH=C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin >> %GITHUB_ENV%
  146. - name: Clone acmetest
  147. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  148. - name: Run acmetest
  149. shell: bash
  150. run: |
  151. if [ "${{ secrets.TokenName1}}" ] ; then
  152. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  153. fi
  154. if [ "${{ secrets.TokenName2}}" ] ; then
  155. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  156. fi
  157. if [ "${{ secrets.TokenName3}}" ] ; then
  158. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  159. fi
  160. if [ "${{ secrets.TokenName4}}" ] ; then
  161. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  162. fi
  163. if [ "${{ secrets.TokenName5}}" ] ; then
  164. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  165. fi
  166. cd ../acmetest
  167. ./letest.sh
  168. FreeBSD:
  169. runs-on: macos-10.15
  170. needs: Windows
  171. env:
  172. TEST_DNS : ${{ secrets.TEST_DNS }}
  173. TestingDomain: ${{ secrets.TestingDomain }}
  174. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  175. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  176. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  177. CASE: le_test_dnsapi
  178. TEST_LOCAL: 1
  179. DEBUG: 1
  180. steps:
  181. - uses: actions/checkout@v2
  182. - name: Clone acmetest
  183. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  184. - uses: vmactions/freebsd-vm@v0.1.4
  185. with:
  186. envs: 'TEST_DNS TestingDomain TEST_DNS_NO_WILDCARD TEST_DNS_NO_SUBDOMAIN TEST_DNS_SLEEP CASE TEST_LOCAL DEBUG ${{ secrets.TokenName1}} ${{ secrets.TokenName2}} ${{ secrets.TokenName3}} ${{ secrets.TokenName4}} ${{ secrets.TokenName5}}'
  187. prepare: pkg install -y socat curl
  188. usesh: true
  189. run: |
  190. if [ "${{ secrets.TokenName1}}" ] ; then
  191. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  192. fi
  193. if [ "${{ secrets.TokenName2}}" ] ; then
  194. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  195. fi
  196. if [ "${{ secrets.TokenName3}}" ] ; then
  197. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  198. fi
  199. if [ "${{ secrets.TokenName4}}" ] ; then
  200. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  201. fi
  202. if [ "${{ secrets.TokenName5}}" ] ; then
  203. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  204. fi
  205. cd ../acmetest
  206. ./letest.sh
  207. Solaris:
  208. runs-on: macos-10.15
  209. needs: FreeBSD
  210. env:
  211. TEST_DNS : ${{ secrets.TEST_DNS }}
  212. TestingDomain: ${{ secrets.TestingDomain }}
  213. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  214. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  215. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  216. CASE: le_test_dnsapi
  217. TEST_LOCAL: 1
  218. DEBUG: 1
  219. steps:
  220. - uses: actions/checkout@v2
  221. - name: Clone acmetest
  222. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  223. - uses: vmactions/solaris-vm@v0.0.4
  224. with:
  225. envs: 'TEST_DNS TestingDomain TEST_DNS_NO_WILDCARD TEST_DNS_NO_SUBDOMAIN TEST_DNS_SLEEP CASE TEST_LOCAL DEBUG ${{ secrets.TokenName1}} ${{ secrets.TokenName2}} ${{ secrets.TokenName3}} ${{ secrets.TokenName4}} ${{ secrets.TokenName5}}'
  226. prepare: pkgutil -y -i socat
  227. run: |
  228. pkg set-mediator -v -I default@1.1 openssl
  229. export PATH=/usr/gnu/bin:$PATH
  230. if [ "${{ secrets.TokenName1}}" ] ; then
  231. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  232. fi
  233. if [ "${{ secrets.TokenName2}}" ] ; then
  234. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  235. fi
  236. if [ "${{ secrets.TokenName3}}" ] ; then
  237. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  238. fi
  239. if [ "${{ secrets.TokenName4}}" ] ; then
  240. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  241. fi
  242. if [ "${{ secrets.TokenName5}}" ] ; then
  243. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  244. fi
  245. cd ../acmetest
  246. ./letest.sh