mirror of
https://github.com/unraid/api.git
synced 2026-01-05 08:00:33 -06:00
feat: buildx build caching
This commit is contained in:
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user