Skip to content

Commit

Permalink
Cache docker layers
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawi01 committed Nov 23, 2024
1 parent 6dc461a commit cb534ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,12 @@ jobs:
with:
name: lombok.jar

- name: Setup docker container build driver
run: docker buildx create --name container --driver=docker-container container

- name: Build container
working-directory: ./docker
run: docker build --build-arg jdk=${{ matrix.jdk }} -t $IMAGE_NAME -f ${{ matrix.tool.name }}/Dockerfile .
run: docker buildx --build-arg jdk=${{ matrix.jdk }} -t $IMAGE_NAME -f ${{ matrix.tool.name }}/Dockerfile --builder=container --cache-to=type=gha,scope=$IMAGE_NAME --cache-from=type=gha,scope=$IMAGE_NAME .

- name: Compile in container
run: docker run --entrypoint="" -v $(pwd)/lombok.jar:/workspace/lombok.jar $IMAGE_NAME /bin/bash -c "cd classpath; ${{ matrix.tool.cmd }}"

0 comments on commit cb534ad

Please sign in to comment.