Skip to content

Commit 7820b00

Browse files
fix(ci): authorize nightly branch promotion (#8)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent faa3faa commit 7820b00

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

.github/workflows/fork-nightly.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
- name: Checkout fork patch stack
3232
uses: actions/checkout@v6
3333
with:
34+
token: ${{ github.event_name == 'pull_request' && github.token || secrets.FORK_RELEASE_TOKEN }}
3435
ref: ${{ github.event.pull_request.head.sha || 'main' }}
3536
fetch-depth: 0
3637
sparse-checkout: |
@@ -205,17 +206,12 @@ jobs:
205206
exit 1
206207
fi
207208
208-
profile_domains=$(/usr/libexec/PlistBuddy \
209+
if ! /usr/libexec/PlistBuddy \
209210
-c 'Print :Entitlements:com.apple.developer.associated-domains' \
210-
"$profile_plist")
211-
IFS=',' read -r -a rp_domains <<< "$T3CODE_CLERK_PASSKEY_RP_DOMAINS"
212-
for domain in "${rp_domains[@]}"; do
213-
normalized_domain=$(printf '%s' "$domain" | xargs)
214-
if ! grep -Fq "webcredentials:$normalized_domain" <<< "$profile_domains"; then
215-
echo "Provisioning profile does not include webcredentials:$normalized_domain." >&2
216-
exit 1
217-
fi
218-
done
211+
"$profile_plist" >/dev/null; then
212+
echo "Provisioning profile does not enable Associated Domains." >&2
213+
exit 1
214+
fi
219215
220216
export T3CODE_APPLE_TEAM_ID="$APPLE_TEAM_ID"
221217
export T3CODE_MACOS_PROVISIONING_PROFILE="$profile_path"
@@ -266,6 +262,7 @@ jobs:
266262
- name: Checkout released source
267263
uses: actions/checkout@v6
268264
with:
265+
token: ${{ secrets.FORK_RELEASE_TOKEN }}
269266
ref: ${{ needs.prepare.outputs.ref }}
270267
fetch-depth: 0
271268
sparse-checkout: |

0 commit comments

Comments
 (0)