mirror of
https://github.com/julia-actions/julia-runtest.git
synced 2026-02-16 21:16:54 +08:00
Compare commits
9 Commits
ib/info_on
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7efd635293 | ||
|
|
d60b785c6f | ||
|
|
80da54fb1f | ||
|
|
2e39f09cda | ||
|
|
4106f361b2 | ||
|
|
1cc5cea014 | ||
|
|
8b0e8344b9 | ||
|
|
639d29024e | ||
|
|
ee4584ffbd |
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Example.jl
|
- name: Checkout Example.jl
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
with:
|
with:
|
||||||
repository: julia-actions/Example.jl
|
repository: julia-actions/Example.jl
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Checkout julia-runtest
|
- name: Checkout julia-runtest
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: ./.github/actions/julia-runtest
|
path: ./.github/actions/julia-runtest
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/test_logger_ci.yml
vendored
2
.github/workflows/test_logger_ci.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout julia-runtest
|
- name: Checkout julia-runtest
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
|
|
||||||
- uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2.6.1
|
- uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2.6.1
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -25,8 +25,16 @@ if haskey(ENV, "GITHUB_SHA") && get(ENV, "GITHUB_EVENT_NAME", "") == "pull_reque
|
|||||||
|
|
||||||
# Check if there's any difference between the merge commit and the PR head
|
# Check if there's any difference between the merge commit and the PR head
|
||||||
# In GitHub Actions, HEAD^2 is the PR head (second parent of merge commit)
|
# In GitHub Actions, HEAD^2 is the PR head (second parent of merge commit)
|
||||||
# success() returns true if the command exits with 0 (no differences)
|
# First check if HEAD^2 exists (i.e., this is actually a merge commit)
|
||||||
has_diff = !success(`git diff --quiet --exit-code HEAD^2 HEAD`)
|
if success(`git rev-parse --verify --quiet HEAD^2`)
|
||||||
|
# Compare tree hashes to check if content actually differs
|
||||||
|
merge_tree = chomp(read(`git rev-parse HEAD^\{tree\}`, String))
|
||||||
|
pr_tree = chomp(read(`git rev-parse HEAD^2^\{tree\}`, String))
|
||||||
|
has_diff = merge_tree != pr_tree
|
||||||
|
else
|
||||||
|
# Not a merge commit, so no difference to report
|
||||||
|
has_diff = false
|
||||||
|
end
|
||||||
|
|
||||||
if has_diff
|
if has_diff
|
||||||
base_branch = isempty(base_branch_name) ? "the base branch" : "'$base_branch_name'"
|
base_branch = isempty(base_branch_name) ? "the base branch" : "'$base_branch_name'"
|
||||||
|
|||||||
Reference in New Issue
Block a user