Skip to content

Commit

Permalink
perf: using cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Jul 17, 2024
1 parent 89fda33 commit 08da9f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/build-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ jobs:
run: echo "REPO=$(basename ${{ github.repository }})" >> $GITHUB_ENV

- name: Build and push multi-arch image
run: |
DOCKER_BUILDKIT=1 docker buildx build \
--platform linux/amd64,linux/arm64 \
-f Dockerfile-base \
-t jumpserver/${{ env.REPO }}-base:${{ env.IMAGE_TAG }} \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--push .
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
file: Dockerfile-base
tags: jumpserver/${{ env.REPO }}-base:${{ env.IMAGE_TAG }}

- name: Update Dockerfile
run: |
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-base
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ RUN set -ex \
WORKDIR /data

COPY package.json yarn.lock ./

RUN --mount=type=cache,target=/usr/local/share/.cache/yarn,sharing=locked,id=yarn-cache \
yarn install

0 comments on commit 08da9f8

Please sign in to comment.