From fe635ccfd4e190b84ec9d3dea2371027a8e8ece2 Mon Sep 17 00:00:00 2001 From: Erlend Hamnaberg Date: Tue, 3 Feb 2026 20:25:44 +0100 Subject: [PATCH 1/3] try by using maven build externally --- .github/workflows/cdk-deploy.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/cdk-deploy.yml b/.github/workflows/cdk-deploy.yml index a06c3fc..376cac2 100644 --- a/.github/workflows/cdk-deploy.yml +++ b/.github/workflows/cdk-deploy.yml @@ -34,6 +34,13 @@ jobs: cache: 'npm' cache-dependency-path: 'cdk/package-lock.json' + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '25' + distribution: corretto + cache: maven + - name: Install CDK dependencies working-directory: ./cdk run: npm ci @@ -41,6 +48,9 @@ jobs: - name: Install AWS CDK CLI run: npm install -g aws-cdk + - name: Build with Maven + run: mvn -B --no-transfer-progress clean package + - name: CDK Deploy working-directory: ./cdk run: cdk deploy --require-approval never From cf7b62002c27cb529629d429db1b6e96e448e506 Mon Sep 17 00:00:00 2001 From: Erlend Hamnaberg Date: Tue, 3 Feb 2026 20:31:06 +0100 Subject: [PATCH 2/3] condition on push docker image --- .github/workflows/maven.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 9547f66..5997e0f 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -48,4 +48,5 @@ jobs: retention-days: 7 - name: Build and push docker image [edge] + if: github.ref == 'refs/heads/master' run: docker buildx build --push -t ghcr.io/javabin/cake-redux:edge --platform linux/amd64,linux/arm64 . \ No newline at end of file From 2c14cba97ff927d08cbb77f7037c25facaf117c3 Mon Sep 17 00:00:00 2001 From: Erlend Hamnaberg Date: Tue, 3 Feb 2026 20:36:55 +0100 Subject: [PATCH 3/3] only build image in non-master --- .github/workflows/maven.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 5997e0f..72d96a9 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -39,14 +39,10 @@ jobs: - name: Build with Maven run: mvn -B --no-transfer-progress clean package - - name: Upload artifact [uber-jar] - uses: actions/upload-artifact@v4 - with: - name: uber-jar - path: target/*-jar-with-dependencies.jar - if-no-files-found: error - retention-days: 7 - - name: Build and push docker image [edge] if: github.ref == 'refs/heads/master' - run: docker buildx build --push -t ghcr.io/javabin/cake-redux:edge --platform linux/amd64,linux/arm64 . \ No newline at end of file + run: docker buildx build --push -t ghcr.io/javabin/cake-redux:edge --platform linux/amd64,linux/arm64 . + + - name: Build docker image [edge] + if: github.ref != 'refs/heads/master' + run: docker buildx build -t ghcr.io/javabin/cake-redux:edge --platform linux/amd64,linux/arm64 . \ No newline at end of file