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 diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 9547f66..72d96a9 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -39,13 +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] - run: docker buildx build --push -t ghcr.io/javabin/cake-redux:edge --platform linux/amd64,linux/arm64 . \ No newline at end of file + if: github.ref == 'refs/heads/master' + 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