From b2ccff074f5c70527faccc9e65f0131f1501616e Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Sat, 19 Sep 2026 16:32:39 +0200 Subject: [PATCH] =?UTF-8?q?migrate=20CI=20to=20namespace=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 18 ++++++++++++++---- .github/workflows/deploy-snapshot.yml | 18 ++++++++++++++---- .github/workflows/deploy.yml | 18 ++++++++++++++---- readme.md | 2 ++ 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c30b12b..beb08b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,14 +9,24 @@ jobs: build: if: github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name name: Build - runs-on: 'ubuntu-latest' + runs-on: namespace-profile-linux-default steps: - - uses: actions/checkout@v5 - - uses: actions/setup-java@v5 + - uses: namespacelabs/nscloud-checkout-action@v9 + - uses: actions/setup-java@v6 with: distribution: 'temurin' java-version: 21 + cache: "" # namespace handles this + - name: Set up cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + cache: gradle + - name: Setup gradle build cache + run: | + nsc cache gradle setup --init-gradle /tmp/init.gradle - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 + with: + cache-disabled: true # namespace handles this - name: Build with Gradle - run: ./gradlew build --stacktrace + run: ./gradlew --init-script=/tmp/init.gradle build --stacktrace diff --git a/.github/workflows/deploy-snapshot.yml b/.github/workflows/deploy-snapshot.yml index 6724d52..8b956e1 100644 --- a/.github/workflows/deploy-snapshot.yml +++ b/.github/workflows/deploy-snapshot.yml @@ -13,15 +13,25 @@ on: jobs: deploy: name: Deploy Snapshot - runs-on: 'ubuntu-latest' + runs-on: namespace-profile-linux-default steps: - - uses: actions/checkout@v5 - - uses: actions/setup-java@v5 + - uses: namespacelabs/nscloud-checkout-action@v9 + - uses: actions/setup-java@v6 with: distribution: 'temurin' java-version: 21 + cache: "" # namespace handles this + - name: Set up cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + cache: gradle + - name: Setup gradle build cache + run: | + nsc cache gradle setup --init-gradle /tmp/init.gradle - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 + with: + cache-disabled: true # namespace handles this - name: Get project version id: get_version shell: bash @@ -30,7 +40,7 @@ jobs: echo "version=$project_version" >> $GITHUB_OUTPUT - name: Deploy snapshot version if: endsWith(steps.get_version.outputs.version, '-SNAPSHOT') - run: ./gradlew build publishCodebookPublicationToPapermcRepository --stacktrace + run: ./gradlew --init-script=/tmp/init.gradle build publishCodebookPublicationToPapermcRepository --stacktrace env: ORG_GRADLE_PROJECT_papermcUsername: ${{ secrets.ARTIFACTORY_USERNAME }} ORG_GRADLE_PROJECT_papermcPassword: ${{ secrets.ARTIFACTORY_PASSWORD }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5dc72ab..a53c334 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,17 +6,27 @@ on: jobs: deploy: name: Deploy - runs-on: 'ubuntu-latest' + runs-on: namespace-profile-linux-default steps: - - uses: actions/checkout@v5 - - uses: actions/setup-java@v5 + - uses: namespacelabs/nscloud-checkout-action@v9 + - uses: actions/setup-java@v6 with: distribution: 'temurin' java-version: 21 + cache: "" # namespace handles this + - name: Set up cache + uses: namespacelabs/nscloud-cache-action@v1 + with: + cache: gradle + - name: Setup gradle build cache + run: | + nsc cache gradle setup --init-gradle /tmp/init.gradle - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 + with: + cache-disabled: true # namespace handles this - name: Deploy - run: ./gradlew build publishCodebookPublicationToPapermcRepository --stacktrace + run: ./gradlew --init-script=/tmp/init.gradle build publishCodebookPublicationToPapermcRepository --stacktrace env: ORG_GRADLE_PROJECT_papermcUsername: ${{ secrets.ARTIFACTORY_USERNAME }} ORG_GRADLE_PROJECT_papermcPassword: ${{ secrets.ARTIFACTORY_PASSWORD }} diff --git a/readme.md b/readme.md index bc901c9..4cacc58 100644 --- a/readme.md +++ b/readme.md @@ -111,3 +111,5 @@ License ======= [LGPL-3.0-only](license.txt) + +CI powered by namespace badge