-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to buildpacks for native builds
- Loading branch information
Showing
4 changed files
with
4 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,51 +26,6 @@ jobs: | |
with: | ||
images: ${{ env.DOCKER_IMAGE_NAME }} | ||
|
||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
distribution: 'graalvm' | ||
java-version: '21' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
cache: 'maven' | ||
|
||
- name: Build application with GraalVM | ||
# to test the GraalVM Build using DevContainers, install GraalVM by running `sdk install java 21.0.1-graal` | ||
run: | | ||
./mvnw -Pnative native:compile -DskipTests | ||
- name: Login to Docker Registry | ||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
uses: docker/[email protected] | ||
id: login-hub | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build the native (GraalVM) Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: ./src/main/docker/Dockerfile.native | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build_native_buildpacks_docker_image: | ||
name: Build and publish the native (GraalVM) Docker image | ||
runs-on: ubuntu-22.04 | ||
env: | ||
DOCKER_IMAGE_NAME: '${{ github.repository_owner }}/jhipster-lite-native-buildpacks' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
|
@@ -92,6 +47,10 @@ jobs: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Tag the native (GraalVM) Docker image | ||
run: | | ||
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ steps.meta.outputs.tags }} | ||
- name: Push the native (GraalVM) Docker image | ||
run: | | ||
docker push --all-tags ${{ env.DOCKER_IMAGE_NAME }} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.