Skip to content

Commit 04c5663

Browse files
committed
fix(workflows): restore git push credentials in workflows that use persist-credentials: false
Because: * A prior security hardening commit added persist-credentials: false to all checkouts across three workflows. While appropriate for read-only checkouts, this setting strips the credential helper from the git config, which broke git push in any checkout that a subsequent push step depends on. The affected checkouts were the gh-pages branch checkouts in cleanup-storybooks and deploy-storybooks, and the sole checkout in tag-release. This commit: * Removes persist-credentials: false from the specific checkouts that feed into push steps, while leaving it in place on read-only checkouts (e.g. the main-repo script checkout in cleanup-storybooks and the repo checkout in deploy-storybooks). This restores implicit GITHUB_TOKEN credential persistence for those steps without widening the credential scope of unrelated checkouts in the same job. Closes #
1 parent 20db6df commit 04c5663

3 files changed

Lines changed: 0 additions & 4 deletions

File tree

.github/workflows/cleanup-storybooks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
ref: gh-pages
2424
path: gh-pages
2525
fetch-depth: 1
26-
persist-credentials: false
2726

2827
- name: Remove PR directory
2928
run: |

.github/workflows/deploy-storybooks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ jobs:
113113
ref: gh-pages
114114
path: gh-pages
115115
fetch-depth: 1
116-
persist-credentials: false
117116

118117
- name: Set deployment directory
119118
id: deploy-dir

.github/workflows/tag-release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818

1919
- name: Check out code
2020
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
21-
with:
22-
persist-credentials: false
2321

2422
- name: Fetch all git tags
2523
run: git fetch --tags origin

0 commit comments

Comments
 (0)