Skip to content

Commit aff10ee

Browse files
committed
ci: use git url rewrite with token for private clone
1 parent c5cfe5f commit aff10ee

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535
uses: actions/checkout@v4
3636

3737
- name: Clone private source
38-
uses: actions/checkout@v4
39-
with:
40-
repository: yijunyu/precc
41-
ref: slice-linux-kernel
42-
token: ${{ secrets.PRIVATE_SOURCE_TOKEN }}
43-
path: precc-src
44-
fetch-depth: 1
38+
env:
39+
TOKEN: ${{ secrets.PRIVATE_SOURCE_TOKEN }}
40+
run: |
41+
git config --global url."https://${TOKEN}@github.com/".insteadOf "https://github.com/"
42+
git clone --depth 1 --branch slice-linux-kernel \
43+
https://github.com/yijunyu/precc.git precc-src
44+
git config --global --unset url."https://${TOKEN}@github.com/".insteadOf
4545
4646
- name: Install system dependencies (Linux)
4747
if: runner.os == 'Linux'

0 commit comments

Comments
 (0)