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.

426 lines
15 KiB

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. concurrency:
  14. group: ${{ github.workflow }}
  15. cancel-in-progress: true
  16. jobs:
  17. CheckToken:
  18. runs-on: ubuntu-latest
  19. outputs:
  20. hasToken: ${{ steps.step_one.outputs.hasToken }}
  21. steps:
  22. - name: Set the value
  23. id: step_one
  24. run: |
  25. if [ "${{secrets.TokenName1}}" ] ; then
  26. echo "::set-output name=hasToken::true"
  27. else
  28. echo "::set-output name=hasToken::false"
  29. fi
  30. - name: Check the value
  31. run: echo ${{ steps.step_one.outputs.hasToken }}
  32. Fail:
  33. runs-on: ubuntu-latest
  34. needs: CheckToken
  35. if: "contains(needs.CheckToken.outputs.hasToken, 'false')"
  36. steps:
  37. - name: "Read this: https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test"
  38. run: |
  39. echo "Read this: https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test"
  40. if [ "${{github.repository_owner}}" != "acmesh-official" ]; then
  41. false
  42. fi
  43. Docker:
  44. runs-on: ubuntu-latest
  45. needs: CheckToken
  46. if: "contains(needs.CheckToken.outputs.hasToken, 'true')"
  47. env:
  48. TEST_DNS : ${{ secrets.TEST_DNS }}
  49. TestingDomain: ${{ secrets.TestingDomain }}
  50. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  51. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  52. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  53. CASE: le_test_dnsapi
  54. TEST_LOCAL: 1
  55. DEBUG: ${{ secrets.DEBUG }}
  56. http_proxy: ${{ secrets.http_proxy }}
  57. https_proxy: ${{ secrets.https_proxy }}
  58. steps:
  59. - uses: actions/checkout@v2
  60. - name: Clone acmetest
  61. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  62. - name: Set env file
  63. run: |
  64. cd ../acmetest
  65. if [ "${{ secrets.TokenName1}}" ] ; then
  66. echo "${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}" >> docker.env
  67. fi
  68. if [ "${{ secrets.TokenName2}}" ] ; then
  69. echo "${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}" >> docker.env
  70. fi
  71. if [ "${{ secrets.TokenName3}}" ] ; then
  72. echo "${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}" >> docker.env
  73. fi
  74. if [ "${{ secrets.TokenName4}}" ] ; then
  75. echo "${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}" >> docker.env
  76. fi
  77. if [ "${{ secrets.TokenName5}}" ] ; then
  78. echo "${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}" >> docker.env
  79. fi
  80. echo "TEST_DNS_NO_WILDCARD" >> docker.env
  81. echo "http_proxy" >> docker.env
  82. echo "https_proxy" >> docker.env
  83. - name: Run acmetest
  84. run: cd ../acmetest && ./rundocker.sh testall
  85. MacOS:
  86. runs-on: macos-latest
  87. needs: Docker
  88. env:
  89. TEST_DNS : ${{ secrets.TEST_DNS }}
  90. TestingDomain: ${{ secrets.TestingDomain }}
  91. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  92. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  93. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  94. CASE: le_test_dnsapi
  95. TEST_LOCAL: 1
  96. DEBUG: ${{ secrets.DEBUG }}
  97. http_proxy: ${{ secrets.http_proxy }}
  98. https_proxy: ${{ secrets.https_proxy }}
  99. steps:
  100. - uses: actions/checkout@v2
  101. - name: Install tools
  102. run: brew install socat
  103. - name: Clone acmetest
  104. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  105. - name: Run acmetest
  106. run: |
  107. if [ "${{ secrets.TokenName1}}" ] ; then
  108. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  109. fi
  110. if [ "${{ secrets.TokenName2}}" ] ; then
  111. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  112. fi
  113. if [ "${{ secrets.TokenName3}}" ] ; then
  114. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  115. fi
  116. if [ "${{ secrets.TokenName4}}" ] ; then
  117. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  118. fi
  119. if [ "${{ secrets.TokenName5}}" ] ; then
  120. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  121. fi
  122. cd ../acmetest
  123. ./letest.sh
  124. Windows:
  125. runs-on: windows-latest
  126. needs: MacOS
  127. env:
  128. TEST_DNS : ${{ secrets.TEST_DNS }}
  129. TestingDomain: ${{ secrets.TestingDomain }}
  130. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  131. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  132. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  133. CASE: le_test_dnsapi
  134. TEST_LOCAL: 1
  135. DEBUG: ${{ secrets.DEBUG }}
  136. http_proxy: ${{ secrets.http_proxy }}
  137. https_proxy: ${{ secrets.https_proxy }}
  138. steps:
  139. - name: Set git to use LF
  140. run: |
  141. git config --global core.autocrlf false
  142. - uses: actions/checkout@v2
  143. - name: Install cygwin base packages with chocolatey
  144. run: |
  145. choco config get cacheLocation
  146. choco install --no-progress cygwin
  147. shell: cmd
  148. - name: Install cygwin additional packages
  149. run: |
  150. C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P socat,curl,cron,unzip,git
  151. shell: cmd
  152. - name: Set ENV
  153. shell: cmd
  154. run: |
  155. echo PATH=C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin >> %GITHUB_ENV%
  156. - name: Clone acmetest
  157. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  158. - name: Run acmetest
  159. shell: bash
  160. run: |
  161. if [ "${{ secrets.TokenName1}}" ] ; then
  162. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  163. fi
  164. if [ "${{ secrets.TokenName2}}" ] ; then
  165. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  166. fi
  167. if [ "${{ secrets.TokenName3}}" ] ; then
  168. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  169. fi
  170. if [ "${{ secrets.TokenName4}}" ] ; then
  171. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  172. fi
  173. if [ "${{ secrets.TokenName5}}" ] ; then
  174. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  175. fi
  176. cd ../acmetest
  177. ./letest.sh
  178. FreeBSD:
  179. runs-on: macos-12
  180. needs: Windows
  181. env:
  182. TEST_DNS : ${{ secrets.TEST_DNS }}
  183. TestingDomain: ${{ secrets.TestingDomain }}
  184. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  185. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  186. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  187. CASE: le_test_dnsapi
  188. TEST_LOCAL: 1
  189. DEBUG: ${{ secrets.DEBUG }}
  190. http_proxy: ${{ secrets.http_proxy }}
  191. https_proxy: ${{ secrets.https_proxy }}
  192. steps:
  193. - uses: actions/checkout@v2
  194. - name: Clone acmetest
  195. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  196. - uses: vmactions/freebsd-vm@v0
  197. with:
  198. 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}}'
  199. prepare: pkg install -y socat curl
  200. usesh: true
  201. copyback: false
  202. run: |
  203. if [ "${{ secrets.TokenName1}}" ] ; then
  204. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  205. fi
  206. if [ "${{ secrets.TokenName2}}" ] ; then
  207. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  208. fi
  209. if [ "${{ secrets.TokenName3}}" ] ; then
  210. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  211. fi
  212. if [ "${{ secrets.TokenName4}}" ] ; then
  213. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  214. fi
  215. if [ "${{ secrets.TokenName5}}" ] ; then
  216. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  217. fi
  218. cd ../acmetest
  219. ./letest.sh
  220. Solaris:
  221. runs-on: macos-12
  222. needs: FreeBSD
  223. env:
  224. TEST_DNS : ${{ secrets.TEST_DNS }}
  225. TestingDomain: ${{ secrets.TestingDomain }}
  226. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  227. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  228. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  229. CASE: le_test_dnsapi
  230. TEST_LOCAL: 1
  231. DEBUG: ${{ secrets.DEBUG }}
  232. http_proxy: ${{ secrets.http_proxy }}
  233. https_proxy: ${{ secrets.https_proxy }}
  234. steps:
  235. - uses: actions/checkout@v2
  236. - name: Clone acmetest
  237. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  238. - uses: vmactions/solaris-vm@v0
  239. with:
  240. 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}}'
  241. copyback: false
  242. prepare: pkgutil -y -i socat
  243. run: |
  244. pkg set-mediator -v -I default@1.1 openssl
  245. export PATH=/usr/gnu/bin:$PATH
  246. if [ "${{ secrets.TokenName1}}" ] ; then
  247. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  248. fi
  249. if [ "${{ secrets.TokenName2}}" ] ; then
  250. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  251. fi
  252. if [ "${{ secrets.TokenName3}}" ] ; then
  253. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  254. fi
  255. if [ "${{ secrets.TokenName4}}" ] ; then
  256. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  257. fi
  258. if [ "${{ secrets.TokenName5}}" ] ; then
  259. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  260. fi
  261. cd ../acmetest
  262. ./letest.sh
  263. OpenBSD:
  264. runs-on: macos-12
  265. needs: Solaris
  266. env:
  267. TEST_DNS : ${{ secrets.TEST_DNS }}
  268. TestingDomain: ${{ secrets.TestingDomain }}
  269. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  270. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  271. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  272. CASE: le_test_dnsapi
  273. TEST_LOCAL: 1
  274. DEBUG: ${{ secrets.DEBUG }}
  275. http_proxy: ${{ secrets.http_proxy }}
  276. https_proxy: ${{ secrets.https_proxy }}
  277. steps:
  278. - uses: actions/checkout@v2
  279. - name: Clone acmetest
  280. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  281. - uses: vmactions/openbsd-vm@v0
  282. with:
  283. 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}}'
  284. prepare: pkg_add socat curl
  285. usesh: true
  286. copyback: false
  287. run: |
  288. if [ "${{ secrets.TokenName1}}" ] ; then
  289. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  290. fi
  291. if [ "${{ secrets.TokenName2}}" ] ; then
  292. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  293. fi
  294. if [ "${{ secrets.TokenName3}}" ] ; then
  295. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  296. fi
  297. if [ "${{ secrets.TokenName4}}" ] ; then
  298. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  299. fi
  300. if [ "${{ secrets.TokenName5}}" ] ; then
  301. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  302. fi
  303. cd ../acmetest
  304. ./letest.sh
  305. NetBSD:
  306. runs-on: macos-12
  307. needs: OpenBSD
  308. env:
  309. TEST_DNS : ${{ secrets.TEST_DNS }}
  310. TestingDomain: ${{ secrets.TestingDomain }}
  311. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  312. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  313. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  314. CASE: le_test_dnsapi
  315. TEST_LOCAL: 1
  316. DEBUG: ${{ secrets.DEBUG }}
  317. http_proxy: ${{ secrets.http_proxy }}
  318. https_proxy: ${{ secrets.https_proxy }}
  319. steps:
  320. - uses: actions/checkout@v2
  321. - name: Clone acmetest
  322. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  323. - uses: vmactions/netbsd-vm@v0
  324. with:
  325. 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}}'
  326. prepare: |
  327. pkg_add curl socat
  328. usesh: true
  329. copyback: false
  330. run: |
  331. if [ "${{ secrets.TokenName1}}" ] ; then
  332. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  333. fi
  334. if [ "${{ secrets.TokenName2}}" ] ; then
  335. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  336. fi
  337. if [ "${{ secrets.TokenName3}}" ] ; then
  338. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  339. fi
  340. if [ "${{ secrets.TokenName4}}" ] ; then
  341. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  342. fi
  343. if [ "${{ secrets.TokenName5}}" ] ; then
  344. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  345. fi
  346. cd ../acmetest
  347. ./letest.sh
  348. DragonFlyBSD:
  349. runs-on: macos-12
  350. needs: NetBSD
  351. env:
  352. TEST_DNS : ${{ secrets.TEST_DNS }}
  353. TestingDomain: ${{ secrets.TestingDomain }}
  354. TEST_DNS_NO_WILDCARD: ${{ secrets.TEST_DNS_NO_WILDCARD }}
  355. TEST_DNS_NO_SUBDOMAIN: ${{ secrets.TEST_DNS_NO_SUBDOMAIN }}
  356. TEST_DNS_SLEEP: ${{ secrets.TEST_DNS_SLEEP }}
  357. CASE: le_test_dnsapi
  358. TEST_LOCAL: 1
  359. DEBUG: ${{ secrets.DEBUG }}
  360. http_proxy: ${{ secrets.http_proxy }}
  361. https_proxy: ${{ secrets.https_proxy }}
  362. steps:
  363. - uses: actions/checkout@v2
  364. - name: Clone acmetest
  365. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  366. - uses: vmactions/dragonflybsd-vm@v0
  367. with:
  368. 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}}'
  369. prepare: |
  370. pkg install -y curl socat
  371. usesh: true
  372. copyback: false
  373. run: |
  374. if [ "${{ secrets.TokenName1}}" ] ; then
  375. export ${{ secrets.TokenName1}}=${{ secrets.TokenValue1}}
  376. fi
  377. if [ "${{ secrets.TokenName2}}" ] ; then
  378. export ${{ secrets.TokenName2}}=${{ secrets.TokenValue2}}
  379. fi
  380. if [ "${{ secrets.TokenName3}}" ] ; then
  381. export ${{ secrets.TokenName3}}=${{ secrets.TokenValue3}}
  382. fi
  383. if [ "${{ secrets.TokenName4}}" ] ; then
  384. export ${{ secrets.TokenName4}}=${{ secrets.TokenValue4}}
  385. fi
  386. if [ "${{ secrets.TokenName5}}" ] ; then
  387. export ${{ secrets.TokenName5}}=${{ secrets.TokenValue5}}
  388. fi
  389. cd ../acmetest
  390. ./letest.sh