From 5592bee5f1c2fcf0e5c6cae8d99a7f622a736533 Mon Sep 17 00:00:00 2001 From: Anthony Dahanne Date: Sun, 16 Jun 2024 17:56:20 -0400 Subject: [PATCH] Add Github Actions builds to create Docker images. --- .github/workflows/build.yaml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 75108cd..8ec7153 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,3 +26,47 @@ jobs: run: | cd server ./mvnw -B verify --file pom.xml + + buildpacks: + name: Build Image with Buildpacks + runs-on: ubuntu-latest + + steps: + - name: Check out sources + uses: actions/checkout@v4 + + - name: Set up JDK 22 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 22 + cache: 'maven' + + - name: Build with Maven + run: | + cd server + ./mvnw -Dspring-boot.build-image.publish \ + -Dspring-boot.build-image.imageName=ttl.sh/restbucks-${GITHUB_WORKFLOW_SHA}:1d \ + -Pbuildpacks + + buildpacks-native: + name: Build Native Image with Buildpacks + runs-on: ubuntu-latest + + steps: + - name: Check out sources + uses: actions/checkout@v4 + + - name: Set up JDK 22 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 22 + cache: 'maven' + + - name: Build with Maven + run: | + cd server + ./mvnw -Dspring-boot.build-image.publish=true \ + -Dspring-boot.build-image.imageName=ttl.sh/restbucks-native-${GITHUB_WORKFLOW_SHA}:1d + -Pbuildpacks-native