Files
medusa-store/.github/actions/cache-bootstrap/action.yml
Philip Korsholm 1b0dd60a33 Feat/new actions (#586)
* test

* test

* create integration testing workflow

* Create unit-testing.yml

* Rename integration-testing to integration-testing.yml

* initial testing

* Update assert-changed-files.sh

* Update integration-testing.yml

* Update unit-testing.yml

* Update assert-changed-files.sh

* Delete integration-testing.yml

* Update assert-changed-files.sh

* Update assert-changed-files.sh

* Update assert-changed-files.sh

* Update order.js

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Update unit-testing.yml

* Create cache-bootstrap.yml

* Update cache-bootstrap.yml

* Update cache-bootstrap.yml

* Update cache-bootstrap.yml

* Update unit-testing.yml

* extracted action

* corrected ext. name for int. tests

* checked out actions

* added fetching of actions

* updated

* updated

* moved package

* updated

* Update action.yml

* Update action.yml

* ended if statement

* updated

* updated

* removed error

* updated cache version

* update

* updated to more strict cache policy

* update

* updated

* updated

* update

* update

* update

* update

* update

* update

* update

* update

* updated to also include on PR

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* removed current branch from diff

* updated comment

* Update action.yml

* Update action.yml

* Update action.yml

* save before merge

* Update action.yml

* Update product.js

* Update product.js

* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml

* Update assert-changed-files-actions.sh

* Update assert-changed-files-actions.sh

* Update product-variant.js

* Update product.js

* Update product.js

* cleanup

Co-authored-by: Sebastian Mateos Nicolajsen <80953876+sebastiannicolajsen@users.noreply.github.com>
Co-authored-by: Sebastian M. Nicolajsen <sebastian.m.nicolajsen@gmail.com>
2021-10-21 17:15:29 +02:00

34 lines
1.3 KiB
YAML

name: cache-bootstrap
description: Creates a cache with the given extension for lerna packages
inputs:
extension:
description: Extension for cache name
partial:
description: Boolean flag to describe whether or not to run a partial bootstrap when finding cache
default: false
runs:
using: composite
steps:
# for always overriding cache, use: pat-s/always-upload-cache@v2.1.5
- uses: actions/cache@v2
id: cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{inputs.extension}}-v6-${{ hashFiles('**/yarn.lock') }}
# We want to only bootstrap and install if no cache is found.
# Futhermore, we might want to do a partial, hoisted, bootstrap towards
# the base branch if it exists, otherwise we choose develop for this.
# yarn install --frozen-lockfile
- run: |
if [[ "${{steps.cache.outputs.cache-hit}}" != "true" || "${{inputs.partial}}" != "true" ]]; then
yarn install --frozen-lockfile
yarn bootstrap --concurrency=2
elif [[ "${{inputs.partial}}" = "true" ]]; then
[[ ! -z "${GITHUB_BASE_REF}" ]] && ref="${GITHUB_BASE_REF#refs/heads/}" || ref="develop"
yarn bootstrap --npm-client=npm --hoist --since "origin/${ref}...HEAD" --concurrency=2
fi
shell: bash