From cbedfba9e883782971bd5a9eba257f1912a59f01 Mon Sep 17 00:00:00 2001 From: AlexBob Date: Tue, 17 Dec 2024 14:51:52 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(`.github/workflows/gradle-buil?= =?UTF-8?q?d.yml`,=20`build.gradle`):=20Add=20support=20for=20building=20o?= =?UTF-8?q?n=20specific=20branches=20and=20improve=20Gradle=20configuratio?= =?UTF-8?q?n=20caching.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle-build.yml | 13 +++++-------- build.gradle | 15 --------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index 6ff2806..a222e26 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -8,6 +8,9 @@ name: Gradle Build Image run-name: ${{ github.actor }} is Build Boot Image Actions on: push: + branches: + - 'main' + - 'dev' tags: - 'v*' release: @@ -16,9 +19,9 @@ env: GITHUB_REGISTRY: ghcr.io/${{ github.actor }} DOCKER_REGISTRY: docker.io/alexbob tags: | - type=semver,pattern={{version}} + type=semver,pattern={{version}},value=v0.0.2 type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} type=ref,event=tag jobs: boot-build-image: @@ -43,12 +46,6 @@ jobs: java-version: '21' distribution: 'liberica' cache: 'gradle' - cache-dependency-path: | # optional - *.gradle* - **/gradle-wrapper.properties - /tmp/*.work - /tmp/*.build - /tmp/*.launch - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: diff --git a/build.gradle b/build.gradle index b988cfb..48d6c30 100644 --- a/build.gradle +++ b/build.gradle @@ -34,21 +34,6 @@ configure(subprojects - project(":boot")) { project -> "BPE_APPEND_JAVA_TOOL_OPTIONS": "-Dfile.encoding=UTF-8 " + "-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager" ] - buildWorkspace { - bind { - source = "/tmp/cache-${rootProject.name}-${project.name}.work" - } - } - buildCache { - bind { - source = "/tmp/cache-${rootProject.name}-${project.name}.build" - } - } - launchCache { - bind { - source = "/tmp/cache-${rootProject.name}-${project.name}.launch" - } - } } configurations {