Skip to content
This repository was archived by the owner on Jun 19, 2021. It is now read-only.

Commit 2af1afb

Browse files
committed
Fix Pull Request compatibility for branch detection
1 parent e6c98ce commit 2af1afb

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ jobs:
2929
fail-fast: false
3030

3131
steps:
32-
- name: Cancel Previous Runs
33-
uses: styfle/[email protected]
34-
with:
35-
access_token: ${{ github.token }}
36-
3732
- uses: actions/checkout@v2
3833
- name: Set up JDK ${{ matrix.java }}
3934
uses: actions/setup-java@v1

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ toothpick {
1111
?: "\"${gitCmd("rev-parse", "--short", "HEAD").output}\""
1212
if(!System.getenv("BRANCH_NAME").isNullOrEmpty()) {
1313
currentBranch = System.getenv("BRANCH_NAME")
14-
} else if (!System.getenv("GITHUB_HEAD_REF").isNullOrEmpty()) {
15-
currentBranch = System.getenv("GITHUB_HEAD_REF")
14+
} else if (!System.getenv("GITHUB_BASE_REF").isNullOrEmpty()) {
15+
currentBranch = System.getenv("GITHUB_BASE_REF")
1616
} else if (!System.getenv("GITHUB_REF").isNullOrEmpty()) {
1717
currentBranch = System.getenv("GITHUB_REF").substring("refs/heads/".length)
1818
} else {

0 commit comments

Comments
 (0)