Run Console #9
This file contains hidden or 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: Run Console | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Branch' | |
| required: false | |
| default: 'develop' | |
| jobs: | |
| run-console: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Clone repository | |
| env: | |
| PAT_TOKEN: ${{ secrets.PAT_TOKEN }} | |
| run: | | |
| git clone --depth 1 --branch ${{ github.event.inputs.branch || 'develop' }} https://x-access-token:${PAT_TOKEN}@github.com/educup/educup-server.git | |
| - name: Install dotnet | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '3.1.x' | |
| - name: Config cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-3dot1-nuget-v1 | |
| - name: Restore packages | |
| run: dotnet restore educup-server/Playground/VAConsole/VAConsole.csproj --locked-mode | |
| - name: Build project | |
| run: dotnet build educup-server/Playground/VAConsole/VAConsole.csproj -c Release | |
| - name: Setup wireguard | |
| env: | |
| VPN_CONFIG: ${{ secrets.VPN_CONFIG }} | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y wireguard resolvconf | |
| echo "$VPN_CONFIG" | sudo tee /etc/wireguard/wg0.conf | |
| sudo wg-quick up wg0 | |
| - name: Run project | |
| working-directory: educup-server/Playground/VAConsole/bin/Release/netcoreapp3.1 | |
| run: dotnet VAConsole.dll |