Skip to content

Commit

Permalink
add actions cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sm47916 committed Nov 30, 2023
1 parent b195305 commit 408f848
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,58 @@ jobs:
cp -r ethlance-config/config .
ls -lah config/
- name: Run ganache service
run: |
docker run --rm -d --name ganache trufflesuite/ganache:v7.9.1 -v -m "easy leave proof verb wait patient fringe laptop intact opera slab shine" -p 8550 -b 0.5 --chain.allowUnlimitedContractSize=true
- name: Run ganache service
run: |
docker run --rm -d --name ganache trufflesuite/ganache:v7.9.1 -v -m "easy leave proof verb wait patient fringe laptop intact opera slab shine" -p 8550 -b 0.5 --chain.allowUnlimitedContractSize=true
- name: Get yarn cache directory for top-level ethlance packages
id: yarn-cache-top-level-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Get yarn cache directory for ethlance Server packages
id: yarn-cache-server-path
run: |
cd server
echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Get yarn cache directory for ethlance UI packages
id: yarn-cache-ui-path
run: |
cd server
echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
cd ..
- name: Restore Top level cache directory for Ethlance
uses: actions/cache@v3
id: yarn-cache-top-level # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-top-level-path.outputs.dir }}
key: ${{ runner.os }}-ethlance-top-level-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-ethlance-top-level-yarn-
- name: Install ethlance top-level node modules
run: |
yarn install
- name: Restore server cache directory for Ethlance
uses: actions/cache@v3
id: yarn-cache-server # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-server-path.outputs.dir }}
key: ${{ runner.os }}-ethlance-server-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-ethlance-server-yarn-
- name: Install ethlance server node modules
run: |
cd server && yarn install
# docker_build:
# strategy:
Expand Down

0 comments on commit 408f848

Please sign in to comment.