File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 options :
1414 - direct
1515 - proxy
16+ upload_debug_artifacts :
17+ description : ' Upload redacted diagnostics on failure for this manual run'
18+ required : true
19+ default : ' false'
20+ type : choice
21+ options :
22+ - ' false'
23+ - ' true'
1624
1725permissions :
1826 contents : write
@@ -71,15 +79,14 @@ jobs:
7179 GCP_SECRET_ID : ${{ vars.GCP_SECRET_ID }}
7280 SCHWAB_REDIRECT_URI : ${{ vars.SCHWAB_REDIRECT_URI }}
7381
74- - name : Upload Error Screenshot
75- if : failure()
82+ - name : Upload Redacted Diagnostics
83+ if : failure() && github.event_name == 'workflow_dispatch' && inputs.upload_debug_artifacts == 'true'
7684 uses : actions/upload-artifact@v7
7785 with :
78- name : debug-screenshots
86+ name : redacted-diagnostics
7987 path : |
80- *.png
8188 *_diagnostics.json
82- retention-days : 3
89+ retention-days : 1
8390
8491 - name : Update Log (Bash Version)
8592 if : success()
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ grep -Eq "channel: ['\"]chrome['\"]" "$repo_dir/main.js"
2222grep -Fq ' PW_TEST_SCREENSHOT_NO_FONTS_READY' " $repo_dir /main.js"
2323grep -Fq ' #placeholderCode' " $repo_dir /main.js"
2424grep -Fq ' #continueButton' " $repo_dir /main.js"
25- grep -Fq ' *.png' " $workflow_file "
25+ grep -Fq ' upload_debug_artifacts:' " $workflow_file "
26+ grep -Fq ' Upload Redacted Diagnostics' " $workflow_file "
27+ grep -Fq " inputs.upload_debug_artifacts == 'true'" " $workflow_file "
2628grep -Fq ' *_diagnostics.json' " $workflow_file "
2729
2830if grep -Fq ' google-chrome-stable_current_amd64.deb' " $workflow_file " ; then
@@ -35,6 +37,11 @@ if grep -Fq 'npx playwright install --with-deps chromium' "$workflow_file"; then
3537 exit 1
3638fi
3739
40+ if grep -Fq ' *.png' " $workflow_file " ; then
41+ echo " workflow should not upload screenshots by default" >&2
42+ exit 1
43+ fi
44+
3845if grep -Fq ' secrets.GCP_PROJECT_ID' " $workflow_file " ; then
3946 echo " workflow should not read GCP_PROJECT_ID from secrets anymore" >&2
4047 exit 1
You can’t perform that action at this time.
0 commit comments