2020-08-27 14:17:10 +00:00
|
|
|
name: LetsEncrypt
|
2020-08-28 17:32:10 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
2020-08-29 05:14:28 +00:00
|
|
|
paths:
|
|
|
|
- '**.sh'
|
2020-08-29 15:23:07 +00:00
|
|
|
- '**.yml'
|
2020-08-28 17:32:10 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- dev
|
2020-08-29 05:14:28 +00:00
|
|
|
paths:
|
|
|
|
- '**.sh'
|
2020-09-01 13:39:44 +00:00
|
|
|
- '**.yml'
|
2020-08-29 05:14:28 +00:00
|
|
|
|
2020-08-27 14:17:10 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-08-29 15:14:18 +00:00
|
|
|
CheckToken:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
hasToken: ${{ steps.step_one.outputs.hasToken }}
|
|
|
|
env:
|
|
|
|
NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
|
|
|
|
steps:
|
|
|
|
- name: Set the value
|
|
|
|
id: step_one
|
2020-08-29 15:19:21 +00:00
|
|
|
run: |
|
|
|
|
if [ "$NGROK_TOKEN" ] ; then
|
|
|
|
echo "::set-output name=hasToken::true"
|
|
|
|
else
|
|
|
|
echo "::set-output name=hasToken::false"
|
|
|
|
fi
|
2020-08-29 15:14:18 +00:00
|
|
|
- name: Check the value
|
|
|
|
run: echo ${{ steps.step_one.outputs.hasToken }}
|
|
|
|
|
2020-08-27 14:17:10 +00:00
|
|
|
Ubuntu:
|
|
|
|
runs-on: ubuntu-latest
|
2020-08-29 15:14:18 +00:00
|
|
|
needs: CheckToken
|
|
|
|
if: "contains(needs.CheckToken.outputs.hasToken, 'true')"
|
2020-08-27 14:17:10 +00:00
|
|
|
env:
|
|
|
|
NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
|
2020-08-28 01:32:38 +00:00
|
|
|
TEST_LOCAL: 1
|
2020-08-27 14:17:10 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install tools
|
|
|
|
run: sudo apt-get install -y socat
|
|
|
|
- name: Clone acmetest
|
|
|
|
run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
|
|
|
|
- name: Run acmetest
|
2020-08-30 15:26:10 +00:00
|
|
|
run: cd ../acmetest && sudo --preserve-env ./letest.sh
|
2020-08-27 14:17:10 +00:00
|
|
|
|
|
|
|
MacOS:
|
|
|
|
runs-on: macos-latest
|
2020-08-28 15:18:05 +00:00
|
|
|
needs: Ubuntu
|
2020-08-27 14:17:10 +00:00
|
|
|
env:
|
|
|
|
NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
|
2020-08-28 01:32:38 +00:00
|
|
|
TEST_LOCAL: 1
|
2020-08-27 14:17:10 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install tools
|
2020-10-21 07:00:33 +00:00
|
|
|
run: brew install socat
|
2020-08-27 14:17:10 +00:00
|
|
|
- name: Clone acmetest
|
|
|
|
run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
|
|
|
|
- name: Run acmetest
|
2020-08-30 15:26:10 +00:00
|
|
|
run: cd ../acmetest && sudo --preserve-env ./letest.sh
|
2020-08-28 15:18:05 +00:00
|
|
|
|
|
|
|
Windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
needs: MacOS
|
|
|
|
env:
|
|
|
|
NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
|
|
|
|
TEST_LOCAL: 1
|
2020-08-29 01:54:02 +00:00
|
|
|
#The 80 port is used by Windows server, we have to use a custom port, ngrok will also use this port.
|
2020-08-28 15:54:39 +00:00
|
|
|
Le_HTTPPort: 8888
|
2020-08-28 15:18:05 +00:00
|
|
|
steps:
|
2020-09-01 13:30:56 +00:00
|
|
|
- name: Set git to use LF
|
2020-09-01 13:34:44 +00:00
|
|
|
run: |
|
2020-09-01 13:30:56 +00:00
|
|
|
git config --global core.autocrlf false
|
2020-08-28 15:18:05 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install cygwin base packages with chocolatey
|
|
|
|
run: |
|
|
|
|
choco config get cacheLocation
|
2020-08-28 15:31:18 +00:00
|
|
|
choco install --no-progress cygwin
|
2020-08-28 15:18:05 +00:00
|
|
|
shell: cmd
|
|
|
|
- name: Install cygwin additional packages
|
|
|
|
run: |
|
2020-08-28 15:31:18 +00:00
|
|
|
C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P socat,curl,cron,unzip,git
|
2020-08-28 15:18:05 +00:00
|
|
|
shell: cmd
|
|
|
|
- name: Set ENV
|
2020-11-18 15:16:36 +00:00
|
|
|
shell: cmd
|
2020-08-28 15:18:05 +00:00
|
|
|
run: |
|
2020-11-18 15:16:36 +00:00
|
|
|
echo PATH=C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin >> %GITHUB_ENV%
|
2020-11-18 14:23:36 +00:00
|
|
|
- name: Check ENV
|
2020-11-18 15:16:36 +00:00
|
|
|
shell: cmd
|
2020-11-18 14:23:36 +00:00
|
|
|
run: |
|
2020-11-18 15:16:36 +00:00
|
|
|
echo "PATH=%PATH%"
|
2020-08-28 15:18:05 +00:00
|
|
|
- name: Clone acmetest
|
|
|
|
shell: cmd
|
2020-09-01 13:30:56 +00:00
|
|
|
run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
|
2020-08-28 15:18:05 +00:00
|
|
|
- name: Run acmetest
|
|
|
|
shell: cmd
|
|
|
|
run: cd ../acmetest && bash.exe -c ./letest.sh
|
|
|
|
|
2020-09-24 13:37:51 +00:00
|
|
|
FreeBSD:
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: Windows
|
|
|
|
env:
|
|
|
|
NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
|
|
|
|
TEST_LOCAL: 1
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Clone acmetest
|
|
|
|
run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
|
2020-10-16 10:47:27 +00:00
|
|
|
- uses: vmactions/freebsd-vm@v0.0.7
|
2020-09-24 13:37:51 +00:00
|
|
|
with:
|
|
|
|
envs: 'NGROK_TOKEN TEST_LOCAL'
|
2020-09-24 14:18:38 +00:00
|
|
|
prepare: pkg install -y socat curl
|
2020-10-09 14:33:21 +00:00
|
|
|
usesh: true
|
2020-09-24 13:37:51 +00:00
|
|
|
run: |
|
|
|
|
cd ../acmetest && ./letest.sh
|
2020-08-28 15:18:05 +00:00
|
|
|
|
2020-11-22 13:41:22 +00:00
|
|
|
Solaris:
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: FreeBSD
|
|
|
|
env:
|
|
|
|
NGROK_TOKEN : ${{ secrets.NGROK_TOKEN }}
|
|
|
|
TEST_LOCAL: 1
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: vmactions/ngrok-tunnel@v0.0.1
|
|
|
|
id: ngrok
|
|
|
|
with:
|
|
|
|
protocol: http
|
|
|
|
port: 8080
|
|
|
|
- name: Set envs
|
|
|
|
run: echo "TestingDomain=${{steps.ngrok.outputs.server}}" >> $GITHUB_ENV
|
|
|
|
- name: Clone acmetest
|
|
|
|
run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
|
|
|
|
- uses: vmactions/solaris-vm@v0.0.1
|
|
|
|
with:
|
|
|
|
envs: 'TEST_LOCAL TestingDomain'
|
|
|
|
nat: |
|
|
|
|
"8080": "80"
|
|
|
|
prepare: pkgutil -y -i socat curl
|
|
|
|
run: |
|
|
|
|
cd ../acmetest && ./letest.sh
|
|
|
|
|