@@ -504,8 +504,21 @@ jobs: |
504 | 504 | with: |
505 | 505 | ref: ${{ needs.production.outputs.android_sha }} |
506 | 506 | fetch-depth: 0 |
507 | | - # Dependency scripts and the build run in this job; only Record build gets a token. |
508 | | - persist-credentials: false |
| 507 | + |
| 508 | + # Dependency scripts and the build run in this job; only Record build gets a token. |
| 509 | + # persist-credentials: false would clean up via `git submodule foreach`, which fails on .repos gitlinks. |
| 510 | + - name: Drop checkout credentials |
| 511 | + run: | |
| 512 | + git config --local --unset-all http.https://github.com/.extraheader || true |
| 513 | + { git config --local --name-only --get-regexp '^includeif\.' || true; } | while read -r key; do |
| 514 | + path=$(git config --local --get "$key") |
| 515 | + git config --local --unset-all "$key" |
| 516 | + case "$path" in "$RUNNER_TEMP"/*) rm -f "$path" ;; esac |
| 517 | + done |
| 518 | + if git config --local --get-regexp '^(http\..*\.extraheader|includeif\.)'; then |
| 519 | + echo "::error::Checkout credentials are still configured" |
| 520 | + exit 1 |
| 521 | + fi |
509 | 522 |
|
510 | 523 | # A queued run can follow a build of the same fingerprint; manual runs always build. |
511 | 524 | - id: record |
@@ -687,8 +700,21 @@ jobs: |
687 | 700 | with: |
688 | 701 | ref: ${{ needs.production.outputs.ios_sha }} |
689 | 702 | fetch-depth: 0 |
690 | | - # Dependency scripts and the build run in this job; only Record build gets a token. |
691 | | - persist-credentials: false |
| 703 | + |
| 704 | + # Dependency scripts and the build run in this job; only Record build gets a token. |
| 705 | + # persist-credentials: false would clean up via `git submodule foreach`, which fails on .repos gitlinks. |
| 706 | + - name: Drop checkout credentials |
| 707 | + run: | |
| 708 | + git config --local --unset-all http.https://github.com/.extraheader || true |
| 709 | + { git config --local --name-only --get-regexp '^includeif\.' || true; } | while read -r key; do |
| 710 | + path=$(git config --local --get "$key") |
| 711 | + git config --local --unset-all "$key" |
| 712 | + case "$path" in "$RUNNER_TEMP"/*) rm -f "$path" ;; esac |
| 713 | + done |
| 714 | + if git config --local --get-regexp '^(http\..*\.extraheader|includeif\.)'; then |
| 715 | + echo "::error::Checkout credentials are still configured" |
| 716 | + exit 1 |
| 717 | + fi |
692 | 718 |
|
693 | 719 | # A queued run can follow a build of the same fingerprint; manual runs always build. |
694 | 720 | - id: record |
|