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.

383 lines
15 KiB

4 years ago
4 years ago
4 years ago
3 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
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 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.repository_owner}}" != "acmesh-official" ]; 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: ${{ secrets.DEBUG }}
  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: ${{ secrets.DEBUG }}
  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: ${{ secrets.DEBUG }}
  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-12
  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: ${{ secrets.DEBUG }}
  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
  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. copyback: false
  190. run: |
  191. if [ "${{ secrets.TokenName1}}" ] ; then
  192. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  193. fi
  194. if [ "${{ secrets.TokenName2}}" ] ; then
  195. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  196. fi
  197. if [ "${{ secrets.TokenName3}}" ] ; then
  198. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  199. fi
  200. if [ "${{ secrets.TokenName4}}" ] ; then
  201. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  202. fi
  203. if [ "${{ secrets.TokenName5}}" ] ; then
  204. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  205. fi
  206. cd ../acmetest
  207. ./letest.sh
  208. Solaris:
  209. runs-on: macos-12
  210. needs: FreeBSD
  211. env:
  212. TEST_DNS : ${{ secrets.TEST_DNS }}
  213. TestingDomain: ${{ secrets.TestingDomain }}
  214. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  215. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  216. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  217. CASE: le_test_dnsapi
  218. TEST_LOCAL: 1
  219. DEBUG: ${{ secrets.DEBUG }}
  220. steps:
  221. - uses: actions/checkout@v2
  222. - name: Clone acmetest
  223. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  224. - uses: vmactions/solaris-vm@v0
  225. with:
  226. 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}}'
  227. copyback: false
  228. prepare: pkgutil -y -i socat
  229. run: |
  230. pkg set-mediator -v -I default@1.1 openssl
  231. export PATH=/usr/gnu/bin:$PATH
  232. if [ "${{ secrets.TokenName1}}" ] ; then
  233. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  234. fi
  235. if [ "${{ secrets.TokenName2}}" ] ; then
  236. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  237. fi
  238. if [ "${{ secrets.TokenName3}}" ] ; then
  239. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  240. fi
  241. if [ "${{ secrets.TokenName4}}" ] ; then
  242. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  243. fi
  244. if [ "${{ secrets.TokenName5}}" ] ; then
  245. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  246. fi
  247. cd ../acmetest
  248. ./letest.sh
  249. OpenBSD:
  250. runs-on: macos-12
  251. needs: Solaris
  252. env:
  253. TEST_DNS : ${{ secrets.TEST_DNS }}
  254. TestingDomain: ${{ secrets.TestingDomain }}
  255. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  256. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  257. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  258. CASE: le_test_dnsapi
  259. TEST_LOCAL: 1
  260. DEBUG: ${{ secrets.DEBUG }}
  261. steps:
  262. - uses: actions/checkout@v2
  263. - name: Clone acmetest
  264. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  265. - uses: vmactions/openbsd-vm@v0
  266. with:
  267. 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}}'
  268. prepare: pkg_add socat curl
  269. usesh: true
  270. copyback: false
  271. run: |
  272. if [ "${{ secrets.TokenName1}}" ] ; then
  273. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  274. fi
  275. if [ "${{ secrets.TokenName2}}" ] ; then
  276. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  277. fi
  278. if [ "${{ secrets.TokenName3}}" ] ; then
  279. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  280. fi
  281. if [ "${{ secrets.TokenName4}}" ] ; then
  282. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  283. fi
  284. if [ "${{ secrets.TokenName5}}" ] ; then
  285. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  286. fi
  287. cd ../acmetest
  288. ./letest.sh
  289. NetBSD:
  290. runs-on: macos-12
  291. needs: OpenBSD
  292. env:
  293. TEST_DNS : ${{ secrets.TEST_DNS }}
  294. TestingDomain: ${{ secrets.TestingDomain }}
  295. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  296. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  297. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  298. CASE: le_test_dnsapi
  299. TEST_LOCAL: 1
  300. DEBUG: ${{ secrets.DEBUG }}
  301. steps:
  302. - uses: actions/checkout@v2
  303. - name: Clone acmetest
  304. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  305. - uses: vmactions/netbsd-vm@v0
  306. with:
  307. 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}}'
  308. prepare: |
  309. pkg_add curl socat
  310. usesh: true
  311. copyback: false
  312. run: |
  313. if [ "${{ secrets.TokenName1}}" ] ; then
  314. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  315. fi
  316. if [ "${{ secrets.TokenName2}}" ] ; then
  317. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  318. fi
  319. if [ "${{ secrets.TokenName3}}" ] ; then
  320. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  321. fi
  322. if [ "${{ secrets.TokenName4}}" ] ; then
  323. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  324. fi
  325. if [ "${{ secrets.TokenName5}}" ] ; then
  326. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  327. fi
  328. cd ../acmetest
  329. ./letest.sh
  330. DragonFlyBSD:
  331. runs-on: macos-12
  332. needs: NetBSD
  333. env:
  334. TEST_DNS : ${{ secrets.TEST_DNS }}
  335. TestingDomain: ${{ secrets.TestingDomain }}
  336. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  337. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  338. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  339. CASE: le_test_dnsapi
  340. TEST_LOCAL: 1
  341. DEBUG: ${{ secrets.DEBUG }}
  342. steps:
  343. - uses: actions/checkout@v2
  344. - name: Clone acmetest
  345. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  346. - uses: vmactions/dragonflybsd-vm@v0
  347. with:
  348. 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}}'
  349. prepare: |
  350. pkg install -y curl socat
  351. usesh: true
  352. copyback: false
  353. run: |
  354. if [ "${{ secrets.TokenName1}}" ] ; then
  355. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  356. fi
  357. if [ "${{ secrets.TokenName2}}" ] ; then
  358. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  359. fi
  360. if [ "${{ secrets.TokenName3}}" ] ; then
  361. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  362. fi
  363. if [ "${{ secrets.TokenName4}}" ] ; then
  364. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  365. fi
  366. if [ "${{ secrets.TokenName5}}" ] ; then
  367. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  368. fi
  369. cd ../acmetest
  370. ./letest.sh