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.

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