Skip to content

Commit 231cab0

Browse files
build: update ref handling in workflow files for improved compatibility
1 parent 1b065a3 commit 231cab0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/rust-minimal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +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: refs/heads/${{ github.head_ref }}
42+
ref: ${{ github.head_ref || github.ref_name }}
4343

4444
- uses: technology-studio-forks/markdown-embed-code@main
4545
with:

.github/workflows/rust-stable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +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: refs/heads/${{ github.head_ref }}
42+
ref: ${{ github.head_ref || github.ref_name }}
4343

4444
- uses: technology-studio-forks/markdown-embed-code@main
4545
with:

0 commit comments

Comments
 (0)