Skip to content

Commit d6df4d2

Browse files
authored
chore: run-console.yml
1 parent 3b90e33 commit d6df4d2

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

.github/workflows/run-console.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run Console Project
1+
name: Run Console
22

33
on:
44
workflow_dispatch:
@@ -7,43 +7,45 @@ on:
77
description: 'Branch'
88
required: false
99
default: 'develop'
10-
runner:
11-
type: choice
12-
description: 'Runner'
13-
required: true
14-
default: 'self-hosted'
15-
options:
16-
- ubuntu-22.04
17-
- self-hosted
1810

1911
jobs:
2012
run-console:
21-
runs-on: ${{ github.event.inputs.runner }}
13+
runs-on: ubuntu-22.04
2214

2315
steps:
24-
- name: Clone Private Repository
16+
- name: Clone repository
2517
env:
2618
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
2719
run: |
28-
git clone --branch ${{ github.event.inputs.branch || 'develop' }} https://x-access-token:${PAT_TOKEN}@github.com/educup/educup-server.git
20+
git clone --depth 1 --branch ${{ github.event.inputs.branch || 'develop' }} https://x-access-token:${PAT_TOKEN}@github.com/educup/educup-server.git
2921
30-
- name: Setup .NET Core 3.1.x
22+
- name: Setup wireguard
23+
env:
24+
VPN_CONFIG: ${{ secrets.VPN_CONFIG }}
25+
run: |
26+
sudo apt-get update && sudo apt-get install -y wireguard resolvconf
27+
echo "$VPN_CONFIG" | sudo tee /etc/wireguard/wg0.conf
28+
sudo wg-quick up wg0
29+
30+
- name: Install dotnet
3131
uses: actions/setup-dotnet@v4
3232
with:
3333
dotnet-version: '3.1.x'
34-
env:
35-
DOTNET_INSTALL_DIR: $HOME/dotnet
3634

37-
- name: Add .NET to PATH
38-
run: |
39-
echo 'export PATH=$PATH:$HOME/dotnet' >> ~/.bashrc
40-
source ~/.bashrc
35+
- name: Config cache
36+
uses: actions/cache@v4
37+
with:
38+
path: ~/.nuget/packages
39+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
40+
restore-keys: |
41+
${{ runner.os }}-3dot1-nuget-v1
4142
42-
- name: Restore .NET packages
43+
- name: Restore packages
4344
run: dotnet restore educup-server/Playground/VAConsole/VAConsole.csproj --locked-mode
4445

45-
- name: Build the project
46-
run: dotnet build educup-server/Playground/VAConsole/VAConsole.csproj --configuration Release
46+
- name: Build project
47+
run: dotnet build educup-server/Playground/VAConsole/VAConsole.csproj -c Release
4748

48-
- name: Run the console project
49-
run: dotnet run --project educup-server/Playground/VAConsole/VAConsole.csproj --configuration Release
49+
- name: Run project
50+
working-directory: educup-server/Playground/VAConsole/bin/Release/netcoreapp3.1
51+
run: dotnet VAConsole.dll

0 commit comments

Comments
 (0)