mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-05-21 08:20:14 +02:00
fix: persist credentials for git push in update-major-minor-tags workflow (#312)
## Problem After upgrading to `actions/checkout@v6`, the `update-major-minor-tags` workflow fails with: ``` fatal: could not read Username for 'https://github.com': No such device or address ``` Example: https://github.com/astral-sh/ruff-action/actions/runs/21509988231/job/61974754475 ## Root Cause `actions/checkout@v6` changed the behavior of `persist-credentials: false`. In v6, credentials are immediately cleaned up after checkout, whereas in v5 they remained available during the job. The workflow sets `persist-credentials: false` and then tries to `git push` — but the auth credentials are already gone. ## Fix Explicitly set `persist-credentials: true` (removing the `false` value). The workflow already has minimal permissions (`contents: write`) scoped only to this job, so this is safe. Added a `zizmor: ignore[artipacked]` comment in case the security linter flags this pattern.
This commit is contained in:
@@ -18,7 +18,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: true
|
||||||
- name: Update Major Minor Tags
|
- name: Update Major Minor Tags
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
|
|||||||
Reference in New Issue
Block a user