Skip to content

Latest commit

 

History

History
82 lines (56 loc) · 2.67 KB

File metadata and controls

82 lines (56 loc) · 2.67 KB
Build Status Commits since latest release Codecov Follow on Twitter (X)

Composer / Get Cache Directory Action

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.


Example Usage

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.


Structure

Inputs

  • working-directory, optional: The working directory to use. Defaults to ".".

Outputs

none

Side Effects

  • The COMPOSER_CACHE_DIR environment variable contains the path to the composer cache directory.