Build the latest version #625
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build the latest version | |
on: | |
push: | |
paths: | |
- "**.sh" | |
pull_request: | |
paths: | |
- "**.sh" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build on ubuntu | |
runs-on: ubuntu-latest | |
env: | |
IP_SERVICE_NAME: checkip.amazonaws.com | |
IP_SERVICE_URL: https://checkip.amazonaws.com | |
strategy: | |
matrix: | |
argument: [install, stop, start, restart, ddns, backup, list, update, purge, uninstall] | |
steps: | |
- name: Check out code into the directory | |
uses: actions/checkout@v4 | |
- name: Install the required tools. | |
run: sudo apt-get update && sudo apt-get install curl -y | |
- name: Test the network using "${{ env.IP_SERVICE_NAME }}" | |
run: curl "${{ env.IP_SERVICE_URL }}" | |
- name: Run wireguard-manager with different arguments | |
run: sudo ./wireguard-manager.sh --${{ matrix.argument }} | |
- name: View WireGuard status | |
run: sudo systemctl status wg-quick@wg0 | |
- name: Add 500 wireguard peers to the mix | |
run: for i in {1..500}; do echo -e "\n" | sudo ./wireguard-manager.sh --add; done | |
- name: Run wireguard-manager with different arguments | |
run: sudo ./wireguard-manager.sh --${{ matrix.argument }} | |
- name: Store configuration files as artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: config-files | |
path: | | |
/etc/wireguard/wg0.conf | |
/etc/wireguard/clients/* | |
/etc/unbound/unbound.conf | |
/var/lib/unbound/root.key | |
/etc/unbound/root.hints | |
/etc/unbound/unbound.conf.d/hosts.conf | |
/etc/resolv.conf | |
- name: View crontab rules | |
run: sudo crontab -l | |
- name: Run wireguard-manager with different arguments | |
run: sudo ./wireguard-manager.sh --${{ matrix.argument }} | |
- name: View crontab rules | |
run: sudo crontab -l | |
- name: Test the network using "${{ env.IP_SERVICE_NAME }}" | |
run: curl "${{ env.IP_SERVICE_URL }}" |