Skip to content

Commit 8bdc596

Browse files
authored
Merge pull request #25 from rubberduck-vba/p0
fix env variable refs
2 parents d44a4f8 + a55b125 commit 8bdc596

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/dotnet-cd-prod.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
runs-on: windows-latest
1212
environment: AZ-Prod
1313

14+
env:
15+
ApiRootUrl: $API_ROOT_URL
16+
1417
steps:
1518
- uses: actions/checkout@v4
1619

@@ -24,8 +27,8 @@ jobs:
2427
2528
- name: configure production front-end environment
2629
run: |
27-
set-content "rubberduckvba.client\src\environments\environment.prod.ts" -value "export const environment = { production: true, apiBaseUrl: '${{ env.API_ROOT_URL }}' };"
28-
set-content "rubberduckvba.client\src\environments\environment.ts" -value "export const environment = { production: true, apiBaseUrl: '${{ env.API_ROOT_URL }}' };"
30+
set-content "rubberduckvba.client\src\environments\environment.prod.ts" -value "export const environment = { production: true, apiBaseUrl: '$ApiRootUrl' };"
31+
set-content "rubberduckvba.client\src\environments\environment.ts" -value "export const environment = { production: true, apiBaseUrl: '$ApiRootUrl' };"
2932
3033
- name: dotnet build
3134
run: dotnet build rubberduckvba.Server --configuration Release

.github/workflows/dotnet-cd.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
runs-on: windows-latest
1414
environment: AZ-Test
1515

16+
env:
17+
ApiRootUrl: $API_ROOT_URL
18+
1619
steps:
1720
- uses: actions/checkout@v4
1821

@@ -26,9 +29,9 @@ jobs:
2629
2730
- name: configure test front-end environment
2831
run: |
29-
set-content "rubberduckvba.client\src\environments\environment.test.ts" -value "export const environment = { production: false, apiBaseUrl: '${{ env.API_ROOT_URL }}' };"
30-
set-content "rubberduckvba.client\src\environments\environment.prod.ts" -value "export const environment = { production: false, apiBaseUrl: '${{ env.API_ROOT_URL }}' };"
31-
set-content "rubberduckvba.client\src\environments\environment.ts" -value "export const environment = { production: false, apiBaseUrl: '${{ env.API_ROOT_URL }}' };"
32+
set-content "rubberduckvba.client\src\environments\environment.test.ts" -value "export const environment = { production: false, apiBaseUrl: '$ApiRootUrl' };"
33+
set-content "rubberduckvba.client\src\environments\environment.prod.ts" -value "export const environment = { production: false, apiBaseUrl: '$ApiRootUrl' };"
34+
set-content "rubberduckvba.client\src\environments\environment.ts" -value "export const environment = { production: false, apiBaseUrl: '$ApiRootUrl' };"
3235
3336
- name: dotnet build
3437
run: dotnet build rubberduckvba.Server --configuration Release

0 commit comments

Comments
 (0)