Skip to content

Commit ed13995

Browse files
committed
fix cicd
1 parent aebe87a commit ed13995

6 files changed

Lines changed: 24 additions & 11 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 10 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-${{ github.head_ref || github.ref }}
23+
group: build-and-test-${{ inputs.target_branch || github.head_ref || github.ref }}
2024
cancel-in-progress: true
2125

2226
jobs:
@@ -30,6 +34,9 @@ jobs:
3034
steps:
3135
- name: Checkout Repository
3236
uses: actions/checkout@v6
37+
with:
38+
ref: ${{ inputs.target_branch || github.ref }}
39+
3340
- name: Apply patch to buildscript.properties
3441
run: sed -i 's/debug_all = false/debug_all = true/g' buildscript.properties
3542

@@ -40,9 +47,9 @@ jobs:
4047
run: ./gradlew --info --scan --stacktrace assemble
4148

4249
- name: Upload Jars
43-
uses: actions/upload-artifact@v5
50+
uses: actions/upload-artifact@v7
4451
with:
45-
name: GTExpert-Core
52+
name: plz_edit
4653
path: build/libs/*.jar
4754
retention-days: 31
4855

.github/workflows/format_java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/update_buildscript.yml

Lines changed: 1 addition & 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/plz_edit'
14+
if: github.repository == 'GTModpackTeam/Buildscripts'
1515

1616
permissions:
1717
contents: write

.github/workflows/update_gradle_cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414

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

2020
steps:

build.gradle

Lines changed: 10 additions & 4 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
@@ -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() {

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)