mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-15 05:51:20 +00:00
feat(cache-magento): include runner.os in the cache key (#245)
Composer's download cache contains platform-specific binaries and extracted archives that aren't safe to share across operating systems. Add the runner OS as a key segment so a Linux job won't restore a macOS-built cache (or vice versa).
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Args: composer_cache_key php_version composer_version
|
||||
# Args: composer_cache_key os php_version composer_version
|
||||
COMPOSER_CACHE_KEY="$1"
|
||||
PHP_VERSION="$2"
|
||||
COMPOSER_VERSION="$3"
|
||||
OS="$2"
|
||||
PHP_VERSION="$3"
|
||||
COMPOSER_VERSION="$4"
|
||||
|
||||
echo "download-key=composer | v5.8 | ${COMPOSER_CACHE_KEY} | ${COMPOSER_VERSION} | ${PHP_VERSION}"
|
||||
echo "download-key=composer | v5.8 | ${OS} | ${COMPOSER_CACHE_KEY} | ${COMPOSER_VERSION} | ${PHP_VERSION}"
|
||||
|
||||
Reference in New Issue
Block a user