diff --git a/.github/workflows/polish-the-code.yml b/.github/workflows/polish-the-code.yml index 613e58f..6359e24 100644 --- a/.github/workflows/polish-the-code.yml +++ b/.github/workflows/polish-the-code.yml @@ -26,12 +26,12 @@ jobs: timeout-minutes: 10 steps: - name: Invoke the Prettier fix - uses: WorkOfStan/prettier-fix@v1.1.1 + uses: WorkOfStan/prettier-fix@v1.1.3 with: commit-changes: true super-linter: needs: prettier-fix - uses: WorkOfStan/seablast-actions/.github/workflows/linter.yml@v0.2.1 + uses: WorkOfStan/seablast-actions/.github/workflows/linter.yml@v0.2.3 with: runs-on: "ubuntu-latest" diff --git a/README.md b/README.md index d083228..b5d0c51 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,14 @@ permissions: | Output | Description | | ------------- | ----------------------------------- | | `branch-name` | The name of the branch created/used | + +## Caching Mechanism + +To optimize execution time, the `vendor` folder is cached, allowing dependencies to be reused across workflow runs. The cache key is generated based on: + +- `composer.json` – to track dependency changes. +- The runner's OS and PHP version – to account for environment-specific variations. + +This approach enables cache sharing across branches. However, if the `composer.json` file in the referenced branch (e.g., `dev`) changes, it's recommended to **invalidate the cache** to ensure a fresh `vendor` folder is built from scratch. + +The cache name (key) is `phpcs-fix-${{ runner.os }}-PHP${{ inputs.php-version }}-vendor-${{ hashFiles('**/composer.json') }}`