mirror of
https://code.forgejo.org/actions/cache.git
synced 2026-08-09 21:11:31 +00:00
checkout: use sh instead of bash for credentials strip
Composite runs inside container jobs (e.g. jest-runtime, e2e runtimes) that don't ship bash. The one-line git config command works in POSIX sh.
This commit is contained in:
parent
51d4504259
commit
94243edc16
1 changed files with 3 additions and 2 deletions
|
|
@ -53,10 +53,11 @@ runs:
|
|||
|
||||
- name: Strip credentials before caching
|
||||
if: inputs.sparse-checkout == '' && inputs.gcs-bucket != '' && steps.restore.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
shell: sh
|
||||
run: |
|
||||
# actions/checkout writes a token-bearing extraheader into .git/config; remove it
|
||||
# so the cached tarball doesn't carry credentials across jobs.
|
||||
# so the cached tarball doesn't carry credentials across jobs. Use sh instead of
|
||||
# bash so the step works in minimal container images (e.g. jest-runtime).
|
||||
git -C "${GITHUB_WORKSPACE}" config --local --unset-all http.https://github.com/.extraheader || true
|
||||
|
||||
- name: Save working tree to GCS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue