Skip to content

Commit 1b065a3

Browse files
build: update checkout action configuration for better token handling and ref fetching
1 parent aa261b8 commit 1b065a3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/rust-minimal.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
image: ${{ matrix.docker_image }}
3737
steps:
3838
- uses: actions/checkout@v4
39+
with:
40+
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
41+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
42+
ref: refs/heads/${{ github.head_ref }}
3943

4044
- uses: technology-studio-forks/markdown-embed-code@main
4145
with:

.github/workflows/rust-stable.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
image: ${{ matrix.docker_image }}
3737
steps:
3838
- uses: actions/checkout@v4
39+
with:
40+
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
41+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
42+
ref: refs/heads/${{ github.head_ref }}
3943

4044
- uses: technology-studio-forks/markdown-embed-code@main
4145
with:

0 commit comments

Comments
 (0)