Skip to content

Commit

Permalink
perf(composer-install): improve caching
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 18, 2023
1 parent 5218936 commit 72d56b1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions composer-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ runs:
- name: 'Handle composer cache'
uses: actions/cache@v3
with:
path: $HOME/.composer
path: /tmp/composer-cache
key: composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ hashFiles('**/composer.json') }}-
composer-
- name: 'Handle vendor folder cache'
uses: actions/cache@v3
with:
path: vendor
key: composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ hashFiles('**/composer.json') }}-
Expand All @@ -43,8 +52,8 @@ runs:
shell: bash
run: |
docker run \
--volume $HOME/.composer:/root/.composer \
--volume /tmp/composer-cache:/root/.composer \
--volume $PWD:/app \
--env COMPOSER_CACHE_DIR=/root/.composer \
${{ steps.prepare.outputs.image }} \
composer install --no-interaction --no-progress ${{ inputs.flags }}
composer install --no-interaction --no-progress ${{ inputs.flags }} --no-scripts --no-plugins

0 comments on commit 72d56b1

Please sign in to comment.