Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/3-add-task-runner-to-jav…
Browse files Browse the repository at this point in the history
…a-image' into feature/3-add-task-runner-to-java-image
  • Loading branch information
dksifoua committed Oct 10, 2024
1 parent 636814b commit 3d21c9f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ jobs:
sudo apt-get update
sudo apt-get install trivy
- name: Create Buildx builder
- name: Build Java Image
run: |
docker buildx create --name my-builder --use
docker buildx inspect --bootstrap
- name: Build Java Image
run: task java:build
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag java:21-graalvm \
--file java/Dockerfile \
.
- name: Verify the built image follows the best practises
run: task java:verify
Expand All @@ -68,4 +69,5 @@ jobs:
run: task java:scan

- name: Push the built image to docker hub
if: success()
run: task java:push
9 changes: 4 additions & 5 deletions java/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ version: 3

env:
DOCKER_BUILDKIT: 1
DOCKER_DEFAULT_PLATFORM: linux/amd64,linux/arm64

tasks:
build:
desc: Build Java image
cmd: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--output type=docker \
--tag java:21-graalvm \
--file java/Dockerfile \
.
--tag java:21-graalvm \
--file java/Dockerfile \
.
silent: true

push:
Expand Down

0 comments on commit 3d21c9f

Please sign in to comment.