feat: buildx build caching

This commit is contained in:
Eli Bosley
2024-10-23 22:29:03 -04:00
parent 7c0cb07b83
commit 420c2c1afd

View File

@@ -14,6 +14,7 @@ concurrency:
jobs:
release-please:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
@@ -44,13 +45,10 @@ jobs:
- name: Build with Buildx
uses: docker/setup-buildx-action@v3
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
install: true
platforms: linux/amd64
- name: Build Builder Image
run: docker buildx build -t builder -f ./Dockerfile .
run: docker buildx build --cache-from=type=gha --cache-to=type=gha,mode=max -t builder -f ./Dockerfile .
lint-api:
needs: [build-register-container]
@@ -71,7 +69,7 @@ jobs:
install: true
platforms: linux/amd64
- name: Build Builder Image
run: docker buildx build -t builder -f ./Dockerfile .
run: docker buildx build --cache-from=type=gha -t builder -f ./Dockerfile .
- name: Lint inside of the docker container
run: |
@@ -96,7 +94,7 @@ jobs:
install: true
platforms: linux/amd64
- name: Build Builder Image
run: docker buildx build -t builder -f ./Dockerfile .
run: docker buildx build --cache-from=type=gha -t builder -f ./Dockerfile .
- name: Test inside of the docker container
run: |
docker run --rm builder npm run coverage
@@ -155,7 +153,7 @@ jobs:
install: true
platforms: linux/amd64
- name: Build Builder Image
run: docker buildx build -t builder -f ./Dockerfile .
run: docker buildx build --cache-from=type=gha -t builder -f ./Dockerfile .
- name: Build inside of the docker container
id: build-pack-binary
run: |