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.

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