Skip to content

Commit

Permalink
Attempt to cache yarn dependencies in GitHub cache
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Dec 7, 2023
1 parent 20ee867 commit d253226
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/docker-vue3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- 'vue3'

env:
TAG: facilmap/facilmap:vue3

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
Expand All @@ -13,6 +16,15 @@ jobs:
-
name: Checkout
uses: actions/checkout@v4

# Set up yarn cache
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
cache: 'yarn'

# Build docker image
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -32,6 +44,10 @@ jobs:
with:
push: true
context: .
tags: facilmap/facilmap:vue3
tags: ${{env.TAG}}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max

-
name: Populate Yarn cache
run: rm -f .yarn/cache/* && docker cp "$(docker create "$TAG"):/opt/facilmap/.yarn/cache/." .yarn/cache/ && ls .yarn/cache

0 comments on commit d253226

Please sign in to comment.