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.

465 lines
17 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
2 years ago
4 years ago
2 years ago
2 years ago
2 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
2 years ago
2 years ago
2 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 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. http_proxy: ${{ secrets.http_proxy }}
  54. https_proxy: ${{ secrets.https_proxy }}
  55. steps:
  56. - uses: actions/checkout@v2
  57. - name: Clone acmetest
  58. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  59. - name: Set env file
  60. run: |
  61. cd ../acmetest
  62. if [ "${{ secrets.TokenName1}}" ] ; then
  63. echo "${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}" >> docker.env
  64. fi
  65. if [ "${{ secrets.TokenName2}}" ] ; then
  66. echo "${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}" >> docker.env
  67. fi
  68. if [ "${{ secrets.TokenName3}}" ] ; then
  69. echo "${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}" >> docker.env
  70. fi
  71. if [ "${{ secrets.TokenName4}}" ] ; then
  72. echo "${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}" >> docker.env
  73. fi
  74. if [ "${{ secrets.TokenName5}}" ] ; then
  75. echo "${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}" >> docker.env
  76. fi
  77. echo "TEST_DNS_NO_WILDCARD" >> docker.env
  78. echo "http_proxy" >> docker.env
  79. echo "https_proxy" >> docker.env
  80. - name: Run acmetest
  81. run: cd ../acmetest && ./rundocker.sh testall
  82. - uses: actions/upload-artifact@v1
  83. if: failure()
  84. with:
  85. name: Docker-logs
  86. path: logs
  87. MacOS:
  88. runs-on: macos-latest
  89. needs: Docker
  90. env:
  91. TEST_DNS : ${{ secrets.TEST_DNS }}
  92. TestingDomain: ${{ secrets.TestingDomain }}
  93. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  94. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  95. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  96. CASE: le_test_dnsapi
  97. TEST_LOCAL: 1
  98. DEBUG: ${{ secrets.DEBUG }}
  99. http_proxy: ${{ secrets.http_proxy }}
  100. https_proxy: ${{ secrets.https_proxy }}
  101. steps:
  102. - uses: actions/checkout@v2
  103. - name: Install tools
  104. run: brew install socat
  105. - name: Clone acmetest
  106. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  107. - name: Run acmetest
  108. run: |
  109. if [ "${{ secrets.TokenName1}}" ] ; then
  110. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  111. fi
  112. if [ "${{ secrets.TokenName2}}" ] ; then
  113. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  114. fi
  115. if [ "${{ secrets.TokenName3}}" ] ; then
  116. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  117. fi
  118. if [ "${{ secrets.TokenName4}}" ] ; then
  119. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  120. fi
  121. if [ "${{ secrets.TokenName5}}" ] ; then
  122. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  123. fi
  124. cd ../acmetest
  125. ./letest.sh
  126. - uses: actions/upload-artifact@v1
  127. if: failure()
  128. with:
  129. name: MacOS-logs
  130. path: |
  131. *.log
  132. Windows:
  133. runs-on: windows-latest
  134. needs: MacOS
  135. env:
  136. TEST_DNS : ${{ secrets.TEST_DNS }}
  137. TestingDomain: ${{ secrets.TestingDomain }}
  138. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  139. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  140. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  141. CASE: le_test_dnsapi
  142. TEST_LOCAL: 1
  143. DEBUG: ${{ secrets.DEBUG }}
  144. http_proxy: ${{ secrets.http_proxy }}
  145. https_proxy: ${{ secrets.https_proxy }}
  146. steps:
  147. - name: Set git to use LF
  148. run: |
  149. git config --global core.autocrlf false
  150. - uses: actions/checkout@v2
  151. - name: Install cygwin base packages with chocolatey
  152. run: |
  153. choco config get cacheLocation
  154. choco install --no-progress cygwin
  155. shell: cmd
  156. - name: Install cygwin additional packages
  157. run: |
  158. C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P socat,curl,cron,unzip,git
  159. shell: cmd
  160. - name: Set ENV
  161. shell: cmd
  162. run: |
  163. echo PATH=C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin >> %GITHUB_ENV%
  164. - name: Clone acmetest
  165. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  166. - name: Run acmetest
  167. shell: bash
  168. run: |
  169. if [ "${{ secrets.TokenName1}}" ] ; then
  170. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  171. fi
  172. if [ "${{ secrets.TokenName2}}" ] ; then
  173. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  174. fi
  175. if [ "${{ secrets.TokenName3}}" ] ; then
  176. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  177. fi
  178. if [ "${{ secrets.TokenName4}}" ] ; then
  179. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  180. fi
  181. if [ "${{ secrets.TokenName5}}" ] ; then
  182. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  183. fi
  184. cd ../acmetest
  185. ./letest.sh
  186. - uses: actions/upload-artifact@v1
  187. if: failure()
  188. with:
  189. name: Windows-logs
  190. path: |
  191. *.log
  192. FreeBSD:
  193. runs-on: macos-12
  194. needs: Windows
  195. env:
  196. TEST_DNS : ${{ secrets.TEST_DNS }}
  197. TestingDomain: ${{ secrets.TestingDomain }}
  198. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  199. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  200. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  201. CASE: le_test_dnsapi
  202. TEST_LOCAL: 1
  203. DEBUG: ${{ secrets.DEBUG }}
  204. http_proxy: ${{ secrets.http_proxy }}
  205. https_proxy: ${{ secrets.https_proxy }}
  206. steps:
  207. - uses: actions/checkout@v2
  208. - name: Clone acmetest
  209. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  210. - uses: vmactions/freebsd-vm@v0
  211. with:
  212. envs: 'TEST_DNS TestingDomain TEST_DNS_NO_WILDCARD TEST_DNS_NO_SUBDOMAIN TEST_DNS_SLEEP CASE TEST_LOCAL DEBUG http_proxy https_proxy ${{ secrets.TokenName1}} ${{ secrets.TokenName2}} ${{ secrets.TokenName3}} ${{ secrets.TokenName4}} ${{ secrets.TokenName5}}'
  213. prepare: pkg install -y socat curl
  214. usesh: true
  215. copyback: false
  216. run: |
  217. if [ "${{ secrets.TokenName1}}" ] ; then
  218. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  219. fi
  220. if [ "${{ secrets.TokenName2}}" ] ; then
  221. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  222. fi
  223. if [ "${{ secrets.TokenName3}}" ] ; then
  224. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  225. fi
  226. if [ "${{ secrets.TokenName4}}" ] ; then
  227. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  228. fi
  229. if [ "${{ secrets.TokenName5}}" ] ; then
  230. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  231. fi
  232. cd ../acmetest
  233. ./letest.sh
  234. - uses: actions/upload-artifact@v1
  235. if: failure()
  236. with:
  237. name: FreeBSD-logs
  238. path: |
  239. *.log
  240. Solaris:
  241. runs-on: macos-12
  242. needs: FreeBSD
  243. env:
  244. TEST_DNS : ${{ secrets.TEST_DNS }}
  245. TestingDomain: ${{ secrets.TestingDomain }}
  246. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  247. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  248. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  249. CASE: le_test_dnsapi
  250. TEST_LOCAL: 1
  251. DEBUG: ${{ secrets.DEBUG }}
  252. http_proxy: ${{ secrets.http_proxy }}
  253. https_proxy: ${{ secrets.https_proxy }}
  254. steps:
  255. - uses: actions/checkout@v2
  256. - name: Clone acmetest
  257. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  258. - uses: vmactions/solaris-vm@v0
  259. with:
  260. envs: 'TEST_DNS TestingDomain TEST_DNS_NO_WILDCARD TEST_DNS_NO_SUBDOMAIN TEST_DNS_SLEEP CASE TEST_LOCAL DEBUG http_proxy https_proxy ${{ secrets.TokenName1}} ${{ secrets.TokenName2}} ${{ secrets.TokenName3}} ${{ secrets.TokenName4}} ${{ secrets.TokenName5}}'
  261. copyback: false
  262. prepare: pkgutil -y -i socat
  263. run: |
  264. pkg set-mediator -v -I default@1.1 openssl
  265. export PATH=/usr/gnu/bin:$PATH
  266. if [ "${{ secrets.TokenName1}}" ] ; then
  267. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  268. fi
  269. if [ "${{ secrets.TokenName2}}" ] ; then
  270. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  271. fi
  272. if [ "${{ secrets.TokenName3}}" ] ; then
  273. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  274. fi
  275. if [ "${{ secrets.TokenName4}}" ] ; then
  276. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  277. fi
  278. if [ "${{ secrets.TokenName5}}" ] ; then
  279. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  280. fi
  281. cd ../acmetest
  282. ./letest.sh
  283. - uses: actions/upload-artifact@v1
  284. if: failure()
  285. with:
  286. name: Solaris-logs
  287. path: |
  288. *.log
  289. OpenBSD:
  290. runs-on: macos-12
  291. needs: Solaris
  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. http_proxy: ${{ secrets.http_proxy }}
  302. https_proxy: ${{ secrets.https_proxy }}
  303. steps:
  304. - uses: actions/checkout@v2
  305. - name: Clone acmetest
  306. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  307. - uses: vmactions/openbsd-vm@v0
  308. with:
  309. envs: 'TEST_DNS TestingDomain TEST_DNS_NO_WILDCARD TEST_DNS_NO_SUBDOMAIN TEST_DNS_SLEEP CASE TEST_LOCAL DEBUG http_proxy https_proxy ${{ secrets.TokenName1}} ${{ secrets.TokenName2}} ${{ secrets.TokenName3}} ${{ secrets.TokenName4}} ${{ secrets.TokenName5}}'
  310. prepare: pkg_add socat curl
  311. usesh: true
  312. copyback: false
  313. run: |
  314. if [ "${{ secrets.TokenName1}}" ] ; then
  315. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  316. fi
  317. if [ "${{ secrets.TokenName2}}" ] ; then
  318. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  319. fi
  320. if [ "${{ secrets.TokenName3}}" ] ; then
  321. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  322. fi
  323. if [ "${{ secrets.TokenName4}}" ] ; then
  324. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  325. fi
  326. if [ "${{ secrets.TokenName5}}" ] ; then
  327. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  328. fi
  329. cd ../acmetest
  330. ./letest.sh
  331. - uses: actions/upload-artifact@v1
  332. if: failure()
  333. with:
  334. name: OpenBSD-logs
  335. path: |
  336. *.log
  337. NetBSD:
  338. runs-on: macos-12
  339. needs: OpenBSD
  340. env:
  341. TEST_DNS : ${{ secrets.TEST_DNS }}
  342. TestingDomain: ${{ secrets.TestingDomain }}
  343. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  344. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  345. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  346. CASE: le_test_dnsapi
  347. TEST_LOCAL: 1
  348. DEBUG: ${{ secrets.DEBUG }}
  349. http_proxy: ${{ secrets.http_proxy }}
  350. https_proxy: ${{ secrets.https_proxy }}
  351. steps:
  352. - uses: actions/checkout@v2
  353. - name: Clone acmetest
  354. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  355. - uses: vmactions/netbsd-vm@v0
  356. with:
  357. envs: 'TEST_DNS TestingDomain TEST_DNS_NO_WILDCARD TEST_DNS_NO_SUBDOMAIN TEST_DNS_SLEEP CASE TEST_LOCAL DEBUG http_proxy https_proxy ${{ secrets.TokenName1}} ${{ secrets.TokenName2}} ${{ secrets.TokenName3}} ${{ secrets.TokenName4}} ${{ secrets.TokenName5}}'
  358. prepare: |
  359. pkg_add curl socat
  360. usesh: true
  361. copyback: false
  362. run: |
  363. if [ "${{ secrets.TokenName1}}" ] ; then
  364. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  365. fi
  366. if [ "${{ secrets.TokenName2}}" ] ; then
  367. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  368. fi
  369. if [ "${{ secrets.TokenName3}}" ] ; then
  370. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  371. fi
  372. if [ "${{ secrets.TokenName4}}" ] ; then
  373. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  374. fi
  375. if [ "${{ secrets.TokenName5}}" ] ; then
  376. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  377. fi
  378. cd ../acmetest
  379. ./letest.sh
  380. - uses: actions/upload-artifact@v1
  381. if: failure()
  382. with:
  383. name: NetBSD-logs
  384. path: |
  385. *.log
  386. DragonFlyBSD:
  387. runs-on: macos-12
  388. needs: NetBSD
  389. env:
  390. TEST_DNS : ${{ secrets.TEST_DNS }}
  391. TestingDomain: ${{ secrets.TestingDomain }}
  392. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  393. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  394. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  395. CASE: le_test_dnsapi
  396. TEST_LOCAL: 1
  397. DEBUG: ${{ secrets.DEBUG }}
  398. http_proxy: ${{ secrets.http_proxy }}
  399. https_proxy: ${{ secrets.https_proxy }}
  400. steps:
  401. - uses: actions/checkout@v2
  402. - name: Clone acmetest
  403. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  404. - uses: vmactions/dragonflybsd-vm@v0
  405. with:
  406. envs: 'TEST_DNS TestingDomain TEST_DNS_NO_WILDCARD TEST_DNS_NO_SUBDOMAIN TEST_DNS_SLEEP CASE TEST_LOCAL DEBUG http_proxy https_proxy ${{ secrets.TokenName1}} ${{ secrets.TokenName2}} ${{ secrets.TokenName3}} ${{ secrets.TokenName4}} ${{ secrets.TokenName5}}'
  407. prepare: |
  408. pkg install -y curl socat
  409. usesh: true
  410. copyback: false
  411. run: |
  412. if [ "${{ secrets.TokenName1}}" ] ; then
  413. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  414. fi
  415. if [ "${{ secrets.TokenName2}}" ] ; then
  416. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  417. fi
  418. if [ "${{ secrets.TokenName3}}" ] ; then
  419. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  420. fi
  421. if [ "${{ secrets.TokenName4}}" ] ; then
  422. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  423. fi
  424. if [ "${{ secrets.TokenName5}}" ] ; then
  425. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  426. fi
  427. cd ../acmetest
  428. ./letest.sh
  429. - uses: actions/upload-artifact@v1
  430. if: failure()
  431. with:
  432. name: DragonFlyBSD-logs
  433. path: |
  434. *.log