Skip to content

Commit dba2759

Browse files
committed
fix cicd
1 parent 3a98058 commit dba2759

9 files changed

Lines changed: 28 additions & 29 deletions

.github/workflows/build_and_test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ name: Build and test
44
on:
55
workflow_dispatch:
66
inputs:
7+
target_branch:
8+
description: 'Target branch to build'
9+
required: false
10+
type: string
711
timeout:
812
description: 'Timeout for runServer (seconds)'
913
required: false
@@ -16,7 +20,7 @@ on:
1620
type: boolean
1721

1822
concurrency:
19-
group: build-and-test-${{ inputs.target_branch || github.ref }}
23+
group: build-and-test-${{ inputs.target_branch || github.head_ref || github.ref }}
2024
cancel-in-progress: true
2125

2226
jobs:
@@ -32,7 +36,7 @@ jobs:
3236
uses: actions/checkout@v6
3337
with:
3438
ref: ${{ inputs.target_branch || github.ref }}
35-
39+
3640
- name: Apply patch to buildscript.properties
3741
run: sed -i 's/debug_all = false/debug_all = true/g' buildscript.properties
3842

@@ -43,7 +47,7 @@ jobs:
4347
run: ./gradlew --info --scan --stacktrace assemble
4448

4549
- name: Upload Jars
46-
uses: actions/upload-artifact@v5
50+
uses: actions/upload-artifact@v7
4751
with:
4852
name: GTMoreTools
4953
path: build/libs/*.jar

.github/workflows/format_java.yml

Lines changed: 3 additions & 3 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-${{ inputs.target_branch || github.ref }}
9+
group: format-${{ github.head_ref || 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: ${{ inputs.target_branch || github.ref }}
25+
ref: ${{ github.head_ref }}
2626

2727
- name: Setup Build
2828
uses: ./.github/actions/build_setup
@@ -70,6 +70,6 @@ jobs:
7070
- name: Comment to PR if from fork and formatting failed
7171
if: failure() && steps.build.conclusion == 'failure' && steps.fork-check.outputs.is_fork == 'true'
7272
run: |
73-
gh pr comment ${{ github.event.pull_request.number }} --body "I can't get automatic fixes by spotless in CI. Please run '. /gradlew spotlessApply' and push again."
73+
gh pr comment ${{ github.event.pull_request.number }} --body "I can't get automatic fixes by spotless in CI. Please run './gradlew spotlessApply' and push again."
7474
env:
7575
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ env:
2929
MODRINTH_PROJECT_ID: "iPEC89hE"
3030

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

3535
jobs:
@@ -44,7 +44,7 @@ jobs:
4444
- name: Checkout Repository
4545
uses: actions/checkout@v6
4646
with:
47-
ref: ${{ inputs.target_branch || github.ref }}
47+
ref: ${{ github.ref }}
4848
fetch-tags: true
4949

5050
- name: Check if tag already exists

.github/workflows/test_java.yml

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

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

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

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

.github/workflows/update_buildscript.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Checkout Repository
2222
uses: actions/checkout@v6
2323
with:
24-
ref: ${{ inputs.target_branch || github.ref }}
24+
ref: ${{ github.ref }}
2525

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

.github/workflows/update_gradle_cache.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,17 @@ on:
99
workflow_dispatch:
1010

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

1515
jobs:
1616
update-cache:
17-
name: Update Grade Cache
17+
name: Update Gradle Cache
1818
runs-on: ubuntu-latest
1919

2020
steps:
2121
- name: Checkout Repository
2222
uses: actions/checkout@v6
23-
with:
24-
ref: ${{ inputs.target_branch || github.ref }}
2523

2624
- name: Setup Build
2725
uses: ./.github/actions/build_setup

build.gradle

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ propertyDefaultIfUnset("mavenArtifactGroup", getDefaultArtifactGroup())
103103
propertyDefaultIfUnset("enableModernJavaSyntax", false)
104104
propertyDefaultIfUnset("enableSpotless", false)
105105
propertyDefaultIfUnset("enableJUnit", false)
106+
propertyDefaultIfUnset("buildscriptRepositoryOwner", "GTModpackTeam")
107+
propertyDefaultIfUnset("buildscriptRepositoryName", "Buildscripts")
106108
propertyDefaultIfUnsetWithEnvVar("deploymentDebug", false, "DEPLOYMENT_DEBUG")
107109

108110

@@ -471,6 +473,10 @@ repositories {
471473
name 'GTCEu Maven'
472474
url 'https://maven.gtceu.com'
473475
}
476+
maven {
477+
name 'Mod Maven'
478+
url 'https://modmaven.dev'
479+
}
474480
}
475481
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
476482
// need to add this here even if we did not above
@@ -562,7 +568,7 @@ dependencies {
562568

563569
compileOnlyApi 'org.jetbrains:annotations:24.1.0'
564570
annotationProcessor 'org.jetbrains:annotations:24.1.0'
565-
patchedMinecraft('net.minecraft:launchwrapper:1.17.2') {
571+
patchedMinecraft('net.minecraft:launchwrapper:1.17.4') {
566572
transitive = false
567573
}
568574

@@ -1419,12 +1425,12 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA
14191425
}
14201426
}
14211427

1422-
static URL availableBuildScriptUrl() {
1423-
new URL("https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/build.gradle")
1428+
URL availableBuildScriptUrl() {
1429+
new URL("https://raw.githubusercontent.com/${project.buildscriptRepositoryOwner}/${project.buildscriptRepositoryName}/master/build.gradle")
14241430
}
14251431

1426-
static URL availableSettingsGradleUrl() {
1427-
new URL("https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/settings.gradle")
1432+
URL availableSettingsGradleUrl() {
1433+
new URL("https://raw.githubusercontent.com/${project.buildscriptRepositoryOwner}/${project.buildscriptRepositoryName}/master/settings.gradle")
14281434
}
14291435

14301436
boolean performBuildScriptUpdate() {

repositories.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
// Add any additional repositories for your dependencies here
22

33
repositories {
4-
maven { // Autoconfig and Autosave
5-
name 'Mod Maven'
6-
url 'https://modmaven.dev'
7-
}
8-
flatDir {
9-
dirs 'libs'
10-
}
114
}

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ gradleEnterprise {
3535

3636
blowdryerSetup {
3737
repoSubfolder 'spotless'
38-
github 'GTModpackTeam/Buildscripts', 'tag', 'v1.0.3'
38+
github 'GTModpackTeam/Buildscripts', 'tag', 'v1.0.4'
3939
}
4040

4141
rootProject.name = rootProject.projectDir.getName()

0 commit comments

Comments
 (0)