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.

98 lines
2.9 KiB

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
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: LetsEncrypt
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. paths:
  7. - '**.sh'
  8. - '**.yml'
  9. pull_request:
  10. branches:
  11. - dev
  12. paths:
  13. - '**.sh'
  14. jobs:
  15. CheckToken:
  16. runs-on: ubuntu-latest
  17. outputs:
  18. hasToken: ${{ steps.step_one.outputs.hasToken }}
  19. env:
  20. NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
  21. steps:
  22. - name: Set the value
  23. id: step_one
  24. run: |
  25. if [ "$NGROK_TOKEN" ] ; 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. Ubuntu:
  33. runs-on: ubuntu-latest
  34. needs: CheckToken
  35. if: "contains(needs.CheckToken.outputs.hasToken, 'true')"
  36. env:
  37. NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
  38. TEST_LOCAL: 1
  39. steps:
  40. - uses: actions/checkout@v2
  41. - name: Install tools
  42. run: sudo apt-get install -y socat
  43. - name: Clone acmetest
  44. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  45. - name: Run acmetest
  46. run: cd ../acmetest && sudo --preserve-env ./letest.sh
  47. MacOS:
  48. runs-on: macos-latest
  49. needs: Ubuntu
  50. env:
  51. NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
  52. TEST_LOCAL: 1
  53. steps:
  54. - uses: actions/checkout@v2
  55. - name: Install tools
  56. run: brew update && brew install socat;
  57. - name: Clone acmetest
  58. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  59. - name: Run acmetest
  60. run: cd ../acmetest && sudo --preserve-env ./letest.sh
  61. Windows:
  62. runs-on: windows-latest
  63. needs: MacOS
  64. env:
  65. NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
  66. TEST_LOCAL: 1
  67. #The 80 port is used by Windows server, we have to use a custom port, ngrok will also use this port.
  68. Le_HTTPPort: 8888
  69. steps:
  70. - name: Set git to use LF
  71. run: |
  72. git config --global core.autocrlf false
  73. - uses: actions/checkout@v2
  74. - name: Install cygwin base packages with chocolatey
  75. run: |
  76. choco config get cacheLocation
  77. choco install --no-progress cygwin
  78. shell: cmd
  79. - name: Install cygwin additional packages
  80. run: |
  81. C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P socat,curl,cron,unzip,git
  82. shell: cmd
  83. - name: Set ENV
  84. run: |
  85. echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin'
  86. - name: Clone acmetest
  87. shell: cmd
  88. run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
  89. - name: Run acmetest
  90. shell: cmd
  91. run: cd ../acmetest && bash.exe -c ./letest.sh