Skip to content

Commit

Permalink
Enable yarn cache
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Dec 8, 2023
1 parent 7cc4462 commit 7af9e03
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/docker-vue3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
uses: actions/checkout@v4

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

# Build docker image
-
Expand All @@ -41,17 +41,17 @@ jobs:
name: Build docker image (FacilMap)
uses: docker/build-push-action@v5
with:
#load: true # Needed to be accessible as $TAG below for yarn cache
push: true
load: true # Needed to be accessible as $TAG below for yarn cache
#push: true
context: .
tags: ${{env.TAG}}
#cache-from: type=gha
#cache-to: type=gha,mode=max

# -
# name: Push docker image (FacilMap)
# run: docker push "$TAG"
-
name: Push docker image (FacilMap)
run: docker push "$TAG"

# -
# name: Populate Yarn cache
# run: rm -f .yarn/cache/* && docker cp "$(docker create "$TAG"):/opt/facilmap/.yarn/cache/." .yarn/cache/ && ls .yarn/cache
-
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 7af9e03

Please sign in to comment.