Skip to content

Commit 3e489b4

Browse files
authored
Update cp_latest_dispatch.yml
1 parent 5901576 commit 3e489b4

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/cp_latest_dispatch.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@ on:
1515
description: 'Patch server port (useful for resolving port conflicts)"'
1616
required: true
1717
default: '5678'
18+
patch-user-email:
19+
description: 'Fake registered email (for fake FE account)'
20+
required: true
21+
default: '[email protected]'
22+
patch-user-firstName:
23+
description: 'Fake registered first name (for fake FE account)'
24+
required: true
25+
default: 'Long'
26+
patch-user-lastName:
27+
description: 'Fake registered first name (for fake FE account)'
28+
required: true
29+
default: 'Wang'
30+
patch-user-country-code:
31+
description: 'Fake registered country code (for fake FE account) ; Ex: 86'
32+
required: true
33+
default: '86'
34+
patch-user-provider:
35+
description: 'Fake registered provider (for fake FE account) ; Ex: Google'
36+
required: true
37+
default: 'Google'
1838

1939
env:
2040
OS_ARCH: ${{ github.event.inputs.os-and-arch }}
@@ -457,6 +477,19 @@ jobs:
457477
Write-Host "index.js (from server) not found"
458478
}
459479
480+
- name: Set user credentials
481+
run: |
482+
$source_json = "FE/resources/app/out/file/identity.getfiddler.com/oauth/token.json"
483+
$main_content = Get-Content -Path $source_json -Raw | ConvertFrom-Json
484+
485+
$main_content.user_info.email = $env:PATCH_USER_EMAIL
486+
$main_content.user_info.firstName = $env:PATCH_USER_FNAME
487+
$main_content.user_info.lastName = $env:PATCH_USER_LNAME
488+
$main_content.user_info.country = $env:PATCH_USER_COUNTRYCODE
489+
$main_content.user_info.identities[0].providerName = $env:PATCH_USER_PROVIDER
490+
491+
$main_content | ConvertTo-Json -Depth 5 | Set-Content -Path $source_json
492+
460493
- name: Patch main.js to main.original.js
461494
run: |
462495
$source_main = "FE/resources/app/out/main.js"

0 commit comments

Comments
 (0)