Skip to content

Commit ee7ea05

Browse files
authored
Update cp_dispatch.yml
1 parent 439549f commit ee7ea05

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

.github/workflows/cp_dispatch.yml

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

2242
env:
2343
OS_ARCH: ${{ github.event.inputs.os-and-arch }}
2444
VERSION_TO_PATCH: ${{ github.event.inputs.version_to_patch }}
2545
PATCH_SERVER_PORT: ${{ github.event.inputs.patch-server-port }}
46+
PATCH_USER_EMAIL: ${{ github.event.inputs.patch-user-email }}
47+
PATCH_USER_FNAME: ${{ github.event.inputs.patch-user-firstName }}
48+
PATCH_USER_LNAME: ${{ github.event.inputs.patch-user-lastName }}
49+
PATCH_USER_COUNTRYCODE: ${{ github.event.inputs.patch-user-country-code }}
50+
PATCH_USER_PROVIDER: ${{ github.event.inputs.patch-user-provider }}
2651

2752
jobs:
2853

@@ -480,6 +505,19 @@ jobs:
480505
Write-Host "index.js (from server) not found"
481506
}
482507
508+
- name: Set user credentials
509+
run: |
510+
$source_json = "FE/resources/app/out/file/identity.getfiddler.com/oauth/token.json"
511+
$main_content = Get-Content -Path $source_json -Raw | ConvertFrom-Json
512+
513+
$json.user_info.email = $env:PATCH_USER_EMAIL
514+
$json.user_info.firstName = $env:PATCH_USER_FNAME
515+
$json.user_info.lastName = $env:PATCH_USER_LNAME
516+
$json.user_info.country = $env:PATCH_USER_COUNTRYCODE
517+
$json.user_info.identities[0].providerName = $env:PATCH_USER_PROVIDER
518+
519+
$main_content | ConvertTo-Json -Depth 5 | Set-Content -Path $source_json
520+
483521
- name: Patch main.js to main.original.js
484522
run: |
485523
$source_main = "FE/resources/app/out/main.js"

0 commit comments

Comments
 (0)