Skip to content

Commit 52b326c

Browse files
build: add ref handling in workflow files for improved pull request support
1 parent 6f56274 commit 52b326c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.github/workflows/rust-minimal.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
with:
4040
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
4141
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
42+
ref: ${{ github.event.pull_request.head.ref || github.ref }}
4243

4344
- uses: technology-studio-forks/markdown-embed-code@main
4445
with:

.github/workflows/rust-stable.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
with:
4040
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
4141
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
42+
ref: ${{ github.event.pull_request.head.ref || github.ref }}
4243

4344
- uses: technology-studio-forks/markdown-embed-code@main
4445
with:

0 commit comments

Comments
 (0)