Skip to content

Commit

Permalink
Cache SCC (#11)
Browse files Browse the repository at this point in the history
Cache SCC, named caches to be more fun
  • Loading branch information
sergeychernyshev authored Apr 20, 2024
1 parent 54b3c6c commit 0633c4a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
22 changes: 16 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@ runs:
with:
path: "scrolls"

- name: Inviting the wizard to extract the inner knowledge
- name: Asking our wizard to extract the inner knowledge
id: cache-scc
uses: actions/cache@v4
env:
cache-name: our-wizard
with:
# we don't expect SCC to change, just use the same version all the time
path: wizard/
key: ${{ env.cache-name }}

- if: ${{ steps.cache-scc.outputs.cache-hit != 'true' }}
name: Inviting a wizard from a distant land
run: |
mkdir -p wizard
wget https://github.com/boyter/scc/releases/download/v3.2.0/scc_Linux_x86_64.tar.gz -O wizard/scc.gz
Expand All @@ -37,15 +48,14 @@ runs:
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
cache-name: tool-stash
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('builders/package-lock.json') }}
key: ${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles('builders/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
${{ env.cache-name }}-${{ runner.os }}-
${{ env.cache-name }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: Check the empty stash
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitterra",
"version": "1.1.2",
"version": "1.1.3",
"description": "A git-based game running in CI/CD and played by coding",
"main": "src/generateMap.js",
"scripts": {
Expand Down

0 comments on commit 0633c4a

Please sign in to comment.