Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/branch_archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ jobs:
repository: ${{ github.repository_owner }}/PyAutoGut
path: .gut
fetch-depth: 1
# Load-bearing. With the default (true), checkout writes an
# `http.https://github.com/.extraheader` auth header into this
# clone's config, and that header WINS over credentials embedded in
# a remote URL. The archive push then goes out as
# github-actions[bot] — which has no access to a sibling repo — and
# fails 403 no matter what `git remote set-url` was told. Leaving it
# on cost one run to discover; the dry run caught it before any
# delete, which is the only reason that was cheap.
persist-credentials: false

- uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -134,6 +143,13 @@ jobs:
echo "::endgroup::"

echo "::group::Archive into the Gut"
# Confirm no inherited credential is about to hijack the push. An
# extraheader here means the archive would go out as the workflow
# identity instead of the PAT — the 403 that cost run #1.
if git config --local --get-regexp 'http\..*\.extraheader' >/dev/null 2>&1; then
echo "::error::the Gut checkout carries a persisted credential; it would override the PAT."
exit 1
fi
# The Gut owns its own namespace and its own refusal-to-overwrite.
PYAUTO_GUT_REMOTE=origin bin/pyauto-gut archive __to_archive__ "$name"
echo "::endgroup::"
Expand Down
Loading