From 680b9bc7149dcb019b5158933341722c97dba7cd Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Sun, 8 Sep 2024 17:33:38 +0200 Subject: [PATCH] feat: added java on bookworm image Signed-off-by: Louis Vallat --- .gitea/workflows/publish_java_bookworm.yml | 36 ++++++++++++++++++++++ java-bookworm/Dockerfile | 6 ++++ 2 files changed, 42 insertions(+) create mode 100644 .gitea/workflows/publish_java_bookworm.yml create mode 100644 java-bookworm/Dockerfile diff --git a/.gitea/workflows/publish_java_bookworm.yml b/.gitea/workflows/publish_java_bookworm.yml new file mode 100644 index 0000000..0331cbb --- /dev/null +++ b/.gitea/workflows/publish_java_bookworm.yml @@ -0,0 +1,36 @@ +name: "Build and publish \"Java default JDK on Bookworm\" image" +defaults: + run: + shell: sh +on: + push: + branches: + - master + paths: + - java-bookworm/** + +jobs: + publish-image: + name: "Build and publish" + runs-on: alpine + steps: + - name: Install dependencies + run: apk add git docker + - name: Check out repository code + uses: actions/checkout@v4 + - name: Login to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: git.louis-vallat.dev + username: louis + password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: ./java-bookworm + file: ./java-bookworm/Dockerfile + platforms: | + linux/amd64 + push: true + tags: | + git.louis-vallat.dev/louis/action-images:java-bookworm diff --git a/java-bookworm/Dockerfile b/java-bookworm/Dockerfile new file mode 100644 index 0000000..d9bbdae --- /dev/null +++ b/java-bookworm/Dockerfile @@ -0,0 +1,6 @@ +FROM node:20-bookworm@sha256:48db4f6ea21d134be744207225753a1730c4bc1b4cdf836d44511c36bf0e34d7 + +RUN apt-get update && \ + apt-get install git -y && \ + apt-get install default-jdk -y && \ + rm -rf /var/lib/apt/lists/* \ No newline at end of file