|
15 | 15 | - Windows (x86_64) |
16 | 16 | - Linux (x86_64) |
17 | 17 | patch-server-port: |
18 | | - description: 'Patch server port (useful for resolving port conflicts)"' |
| 18 | + description: 'Patch server port (useful for resolving port conflicts)' |
19 | 19 | required: true |
20 | 20 | default: '5678' |
| 21 | + patch-user-email: |
| 22 | + description: 'Fake registered email (for fake FE account)' |
| 23 | + required: true |
| 24 | + |
| 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' |
21 | 41 |
|
22 | 42 | env: |
23 | 43 | OS_ARCH: ${{ github.event.inputs.os-and-arch }} |
24 | 44 | VERSION_TO_PATCH: ${{ github.event.inputs.version_to_patch }} |
25 | 45 | 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 }} |
26 | 51 |
|
27 | 52 | jobs: |
28 | 53 |
|
@@ -480,6 +505,19 @@ jobs: |
480 | 505 | Write-Host "index.js (from server) not found" |
481 | 506 | } |
482 | 507 |
|
| 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 | + $main_content.user_info.email = $env:PATCH_USER_EMAIL |
| 514 | + $main_content.user_info.firstName = $env:PATCH_USER_FNAME |
| 515 | + $main_content.user_info.lastName = $env:PATCH_USER_LNAME |
| 516 | + $main_content.user_info.country = $env:PATCH_USER_COUNTRYCODE |
| 517 | + $main_content.user_info.identities[0].providerName = $env:PATCH_USER_PROVIDER |
| 518 | +
|
| 519 | + $main_content | ConvertTo-Json -Depth 5 | Set-Content -Path $source_json |
| 520 | +
|
483 | 521 | - name: Patch main.js to main.original.js |
484 | 522 | run: | |
485 | 523 | $source_main = "FE/resources/app/out/main.js" |
|
0 commit comments