Skip to content

Commit f85d785

Browse files
ci(mobile): dev client builds drop checkout credentials by hand
Co-Authored-By: Claude Fable 5.2 <[email protected]>
1 parent 6d0df65 commit f85d785

1 file changed

Lines changed: 24 additions & 4 deletions

File tree

‎.github/workflows/mobile-dev-client.yml‎

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,21 @@ jobs:
8383
steps:
8484
- name: Checkout
8585
uses: actions/checkout@v6
86-
# Credentials stay: removing them runs `git submodule foreach`, which fails on
87-
# the vendored repositories' gitlinks under .repos (they have no .gitmodules entry).
8886
with:
8987
ref: ${{ inputs.ref || github.sha }}
9088

89+
# The build runs dependency scripts; it gets no token. `persist-credentials: false`
90+
# fails here: its cleanup runs `git submodule foreach`, which stops at the vendored
91+
# gitlinks under .repos (no .gitmodules entry).
92+
- name: Drop checkout credentials
93+
run: |
94+
git config --local --name-only --get-regexp '^(http\..*\.extraheader|includeif\..*)$' \
95+
| while read -r key; do git config --local --unset-all "$key"; done
96+
if git config --local --get-regexp 'extraheader|includeif' ; then
97+
echo "::error::checkout credentials are still configured"
98+
exit 1
99+
fi
100+
91101
- name: Prepare build directories
92102
run: |
93103
cache="$HOME/.cache/t3-android-dev-client"
@@ -194,11 +204,21 @@ jobs:
194204
steps:
195205
- name: Checkout
196206
uses: actions/checkout@v6
197-
# Credentials stay: removing them runs `git submodule foreach`, which fails on
198-
# the vendored repositories' gitlinks under .repos (they have no .gitmodules entry).
199207
with:
200208
ref: ${{ inputs.ref || github.sha }}
201209

210+
# The build runs dependency scripts; it gets no token. `persist-credentials: false`
211+
# fails here: its cleanup runs `git submodule foreach`, which stops at the vendored
212+
# gitlinks under .repos (no .gitmodules entry).
213+
- name: Drop checkout credentials
214+
run: |
215+
git config --local --name-only --get-regexp '^(http\..*\.extraheader|includeif\..*)$' \
216+
| while read -r key; do git config --local --unset-all "$key"; done
217+
if git config --local --get-regexp 'extraheader|includeif' ; then
218+
echo "::error::checkout credentials are still configured"
219+
exit 1
220+
fi
221+
202222
- name: Setup dependencies
203223
uses: ./.github/actions/setup-ci-deps
204224
with:

0 commit comments

Comments
 (0)