Skip to content

Commit 2b412ec

Browse files
committed
- added cache for the frontend part so it doesn't need to rebuild if the yarn.lock has not changed
- added cache for the docker build part so subsequent builds can go faster
1 parent 9853034 commit 2b412ec

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/docker-publish.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ jobs:
1212
name: Checkout
1313
uses: actions/checkout@v3
1414
-
15-
name: Build Frontend
15+
name: Cache frontend artifacts
16+
id: cache-frontend
17+
uses: actions/cache@v3
18+
with:
19+
path: frontend/dist
20+
key: ${{ runner.os }}-frontend-${{ hashFiles('frontend/yarn.lock') }}
21+
restore-keys: |
22+
${{ runner.os }}-frontend-
23+
-
24+
name: Build Frontend if not cached
25+
if: steps.cache-frontend.outputs.cache-hit != 'true'
1626
run: |
1727
chmod +x scripts/ci/frontend-build
1828
./scripts/ci/frontend-build
@@ -37,3 +47,5 @@ jobs:
3747
platforms: linux/amd64,linux/arm64,linux/arm/v7
3848
push: true
3949
tags: zuptalo/nginx-proxy-manager:develop
50+
cache-from: type=gha
51+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)