From c4ddab4e830ebc5f8facb65da385d2eec57071af Mon Sep 17 00:00:00 2001 From: Nao_ke Date: Wed, 6 May 2020 23:58:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/FUNDING.yml | 3 - .../bug-report-or-suport-request.md | 49 ---------- .github/ISSUE_TEMPLATE/feature-request.md | 31 ------ .github/workflows/lint.yml | 26 ----- .github/workflows/test.yml | 97 ------------------- 5 files changed, 206 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug-report-or-suport-request.md delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.md delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 7d1aa44..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -patreon: angristan -liberapay: angristan -ko_fi: angristan diff --git a/.github/ISSUE_TEMPLATE/bug-report-or-suport-request.md b/.github/ISSUE_TEMPLATE/bug-report-or-suport-request.md deleted file mode 100644 index f59acf9..0000000 --- a/.github/ISSUE_TEMPLATE/bug-report-or-suport-request.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: Bug report / Support request -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Checklist** - -- [ ] I read the [README](https://github.com/angristan/openvpn-install/blob/master/README.md) -- [ ] I read the [FAQ](https://github.com/angristan/openvpn-install/blob/master/FAQ.md) -- [ ] I searched the [issues](https://github.com/angristan/openvpn-install/issues?q=is%3Aissue+) -- [ ] My issue is about the script, and not OpenVPN itself - - - -**Describe the issue** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: - -1. ... - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Logs** -If applicable, add logs or screenshots to help explain your problem. - -If you can reproduce the issue, please run the script in debug mode and post the output: `bash -x openvpn-install.sh` - -**Server if applicable):** - -- OS: [e.g. Debian 10] -- Hosting provider (if applicable): [e.g. Vultr, AWS] - -**Client (if applicable):** - -- Device: [e.g. iPhone6] -- OS: [e.g. iOS8.1] -- Client: [e.g. OpenVPN Connect] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index e5dd037..0000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Checklist** - -- [ ] I read the [README](https://github.com/angristan/openvpn-install/blob/master/README.md) -- [ ] I read the [FAQ](https://github.com/angristan/openvpn-install/blob/master/FAQ.md) -- [ ] I searched the [issues](https://github.com/angristan/openvpn-install/issues?q=is%3Aissue+) -- [ ] My issue is about the script, and not OpenVPN itself - - - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 4628851..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,26 +0,0 @@ -on: - push: - branches: - - master - pull_request: - branches: - - master - -name: Lint -jobs: - shellcheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: shellcheck - uses: ludeeus/action-shellcheck@0.0.1 - env: - SHELLCHECK_OPTS: -e SC1091,SC2164,SC2034,SC1072,SC1073,SC1009 - shfmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: shfmt - uses: bltavares/actions/shfmt@master - env: - SHFMT_ARGS: -d diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index e7b1e1c..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,97 +0,0 @@ -on: - push: - branches: - - master - -name: Test -jobs: - install: - runs-on: ubuntu-latest - if: github.repository == 'angristan/openvpn-install' && github.actor == 'angristan' - strategy: - matrix: - os-image: - - debian-9-x64 - - debian-10-x64 - - ubuntu-18-04-x64 - - ubuntu-16-04-x64 - - ubuntu-20-04-x64 - - fedora-30-x64 - - fedora-31-x64 - - centos-7-x64 - - centos-8-x64 - steps: - - uses: actions/checkout@master - - - name: Setup doctl - uses: digitalocean/action-doctl@v2 - with: - token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} - - - name: Create server - run: doctl compute droplet create openvpn-action-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER-${{ matrix.os-image }} --size s-1vcpu-1gb --image ${{ matrix.os-image }} --region lon1 --enable-ipv6 --ssh-keys be:66:76:61:a8:71:93:aa:e3:19:ba:d8:0d:d2:2d:d4 --wait - - - name: Get server ID - run: echo ::set-output name=value::$(doctl compute droplet list -o json | jq -r '.[] | select(.name == "'openvpn-action-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER-${{ matrix.os-image }}'").id') - id: server_id - - - name: Move server to dedicated project - run: doctl projects resources assign ${{ secrets.DIGITALOCEAN_PROJECT_ID }} --resource=do:droplet:${{ steps.server_id.outputs.value }} - - - name: Wait for server to boot - run: sleep 90 - - - name: Get server IP - run: echo ::set-output name=value::$(doctl compute droplet list -o json | jq -r '.[] | select(.name == "'openvpn-action-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER-${{ matrix.os-image }}'").networks.v4 | .[0].ip_address') - id: server_ip - - - name: Get server OS - run: echo ::set-output name=value::$(echo ${{ matrix.os-image }} | cut -d '-' -f1) - id: server_os - - - name: Setup remote server (Debian/Ubuntu) - if: steps.server_os.outputs.value == 'debian' || steps.server_os.outputs.value == 'ubuntu' - uses: appleboy/ssh-action@master - with: - host: ${{ steps.server_ip.outputs.value }} - username: root - key: ${{ secrets.SSH_KEY }} - script: set -x && apt-get update && apt-get install -y git - - - name: Setup remote server (Fedora) - if: steps.server_os.outputs.value == 'fedora' - uses: appleboy/ssh-action@master - with: - host: ${{ steps.server_ip.outputs.value }} - username: root - key: ${{ secrets.SSH_KEY }} - script: set -x && dnf install -y git - - - name: Setup remote server (CentOS) - if: steps.server_os.outputs.value == 'centos' - uses: appleboy/ssh-action@master - with: - host: ${{ steps.server_ip.outputs.value }} - username: root - key: ${{ secrets.SSH_KEY }} - script: set -x && yum install -y git - - - name: Download repo and checkout current commit - uses: appleboy/ssh-action@master - with: - host: ${{ steps.server_ip.outputs.value }} - username: root - key: ${{ secrets.SSH_KEY }} - script: set -x && git clone https://github.com/angristan/openvpn-install.git && cd openvpn-install && git checkout ${{ github.event.pull_request.head.sha }} - - - name: Run openvpn-install.sh in headless mode - uses: appleboy/ssh-action@master - with: - host: ${{ steps.server_ip.outputs.value }} - username: root - key: ${{ secrets.SSH_KEY }} - script: 'set -x && AUTO_INSTALL=y bash -x ~/openvpn-install/openvpn-install.sh && ps aux | grep openvpn | grep -v grep > /dev/null 2>&1 && echo "Success: OpenVPN is running" && exit 0 || echo "Failure: OpenVPN is not running" && exit 1' - - - name: Delete server - run: doctl compute droplet delete -f openvpn-action-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER-${{ matrix.os-image }} - if: always()