| 1 | name: 'Install dependencies but use current build for pure-rand' |
| 2 | description: 'Install dependencies but use current build for pure-rand' |
| 3 | inputs: |
| 4 | path: |
| 5 | description: 'Directory path' |
| 6 | required: true |
| 7 | runs: |
| 8 | using: 'composite' |
| 9 | steps: |
| 10 | - run: | |
| 11 | PROJECT_ROOT_PATH="$(pwd)" |
| 12 | cd "${{inputs.path}}" |
| 13 | echo "ℹ️ Clean yarn cache entry for pure-rand (if any)..." |
| 14 | yarn cache clean pure-rand |
| 15 | echo "ℹ️ Install dependencies..." |
| 16 | yarn --frozen-lockfile |
| 17 | echo "ℹ️ Clean yarn cache entry for pure-rand..." |
| 18 | yarn cache clean pure-rand |
| 19 | echo "ℹ️ Install current build for pure-rand..." |
| 20 | yarn add "file:$PROJECT_ROOT_PATH/pure-rand.tgz" |
| 21 | echo "ℹ️ Clean yarn cache entry for pure-rand..." |
| 22 | yarn cache clean pure-rand |
| 23 | echo "ℹ️ Revert local changes..." |
| 24 | git checkout -- package.json |
| 25 | git checkout -- yarn.lock |
| 26 | shell: bash |
| 27 | - run: | |
| 28 | echo "ℹ️ Copy script..." |
| 29 | cp .github/actions/install-deps-with-current-fc/check-hash.cjs "${{inputs.path}}/check-hash-$GITHUB_SHA.cjs" |
| 30 | echo "ℹ️ Check version of pure-rand..." |
| 31 | cd "${{inputs.path}}" |
| 32 | node check-hash-*.cjs |
| 33 | echo "ℹ️ Remove script..." |
| 34 | rm "check-hash-$GITHUB_SHA.cjs" |
| 35 | shell: bash |