This action determines the Composer cache directory and exports it as COMPOSER_CACHE_DIR
environment variable. It allows you to specify the working directory for the Composer command to determine the cache directory.
Create a new workflow file, for example, .github/workflows/integrate.yml
, and add the following code to it.
---
on:
push:
branches:
- master
pull_request:
name: 🔍 Continuous integration
jobs:
integrate:
runs-on: ubuntu-latest
steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v4
# ...
- name: 🎯 Get Composer Cache Directory
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@master
with:
working-directory: '.'
# ...
...
For details, see actions/composer/get-cache-directory/action.yml
file.
Real-world examples can be found in the wayofdev/laravel-package-tpl
repository.
working-directory
, optional: The working directory to use. Defaults to"."
.
none
- The
COMPOSER_CACHE_DIR
environment variable contains the path to the composer cache directory.