Skip to content

Commit 047e86e

Browse files
committed
fix cicd
1 parent f23cf83 commit 047e86e

6 files changed

Lines changed: 19 additions & 7 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
type: boolean
1717

1818
concurrency:
19-
group: build-and-test-${{ github.head_ref || github.ref }}
19+
group: build-and-test-${{ inputs.target_branch || github.ref }}
2020
cancel-in-progress: true
2121

2222
jobs:
@@ -30,6 +30,9 @@ jobs:
3030
steps:
3131
- name: Checkout Repository
3232
uses: actions/checkout@v6
33+
with:
34+
ref: ${{ inputs.target_branch || github.ref }}
35+
3336
- name: Apply patch to buildscript.properties
3437
run: sed -i 's/debug_all = false/debug_all = true/g' buildscript.properties
3538

.github/workflows/format_java.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
paths: ['src/main/java/**', 'src/test/**']
77

88
concurrency:
9-
group: format-${{ github.head_ref || github.ref }}
9+
group: format-${{ inputs.target_branch || github.ref }}
1010
cancel-in-progress: true
1111

1212
jobs:
@@ -22,7 +22,7 @@ jobs:
2222
- name: Checkout Repository
2323
uses: actions/checkout@v6
2424
with:
25-
ref: ${{ github.head_ref }}
25+
ref: ${{ inputs.target_branch || github.ref }}
2626

2727
- name: Setup Build
2828
uses: ./.github/actions/build_setup

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ env:
2929
MODRINTH_PROJECT_ID: "ipueNiWG"
3030

3131
concurrency:
32-
group: publish-${{ github.head_ref || github.ref }}
32+
group: publish-${{ inputs.target_branch || github.ref }}
3333
cancel-in-progress: true
3434

3535
jobs:
@@ -43,6 +43,9 @@ jobs:
4343
steps:
4444
- name: Checkout Repository
4545
uses: actions/checkout@v6
46+
with:
47+
ref: ${{ inputs.target_branch || github.ref }}
48+
fetch-tags: true
4649

4750
- name: Check if tag already exists
4851
run: |

.github/workflows/test_java.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- '*'
88

99
concurrency:
10-
group: test-${{ github.head_ref || github.ref }}
10+
group: test-${{ inputs.target_branch || github.ref }}
1111
cancel-in-progress: true
1212

1313
jobs:
@@ -18,6 +18,8 @@ jobs:
1818
steps:
1919
- name: Checkout Repository
2020
uses: actions/checkout@v6
21+
with:
22+
ref: ${{ inputs.target_branch || github.ref }}
2123

2224
- name: Apply patch to buildscript.properties
2325
run: sed -i 's/debug_all = false/debug_all = true/g' buildscript.properties

.github/workflows/update_buildscript.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
# Avoid running this workflow on forks
14-
if: github.repository == 'GTModpackTeam/GTExpert-Core'
14+
if: github.repository == 'GTModpackTeam/GTMoreTools'
1515

1616
permissions:
1717
contents: write
@@ -20,6 +20,8 @@ jobs:
2020
steps:
2121
- name: Checkout Repository
2222
uses: actions/checkout@v6
23+
with:
24+
ref: ${{ inputs.target_branch || github.ref }}
2325

2426
- name: Setup Build
2527
uses: ./.github/actions/build_setup

.github/workflows/update_gradle_cache.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
concurrency:
12-
group: gradle-cache-${{ github.ref }}
12+
group: gradle-cache-${{ inputs.target_branch || github.ref }}
1313
cancel-in-progress: true
1414

1515
jobs:
@@ -20,6 +20,8 @@ jobs:
2020
steps:
2121
- name: Checkout Repository
2222
uses: actions/checkout@v6
23+
with:
24+
ref: ${{ inputs.target_branch || github.ref }}
2325

2426
- name: Setup Build
2527
uses: ./.github/actions/build_setup

0 commit comments

Comments
 (0)