-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.37 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CD
on:
workflow_dispatch:
env:
APP_CREDENTIALS_PATH: '${{ github.workspace }}/Private/Constants.cs'
jobs:
deploy:
name: Deploy
runs-on: self-hosted
steps:
- name: Install PowerShell
run: |
sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common
source /etc/os-release
wget -q https://packages.microsoft.com/config/ubuntu/$VERSION_ID/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y powershell
- name: Checkout code
uses: actions/checkout@v4
- name: Update installed .NET workloads
run: |
dotnet workload update
- name: Install the .NET Aspire workload
run: |
dotnet workload install aspire
- name: Restore dependencies
run: |
dotnet restore
- name: Save Base64 credentials into a file
shell: pwsh
run: |
$bytes = [Convert]::FromBase64String($env:CREDENTIALS)
[IO.File]::WriteAllBytes($env:APP_CREDENTIALS_PATH, $bytes)
env:
CREDENTIALS: '${{ secrets.APICREDENTIALS }}'
- name: Run .NET Aspire AppHost
run: |
dotnet run --project AppHost/Republic.AppHost.csproj