1.1.0
Cache PHP extensions in GitHub Actions
Cache PHP extensions in GitHub Actions. This action has to be used along with shivammathur/setup-php and actions/cache GitHub Actions. It configures the environment required to cache PHP extensions. Refer to Usage section to see how to use this.
Contents
🎉 PHP Support
| PHP Version | Stability | Release Support |
|---|---|---|
| 5.3 | Stable |
End of life |
| 5.4 | Stable |
End of life |
| 5.5 | Stable |
End of life |
| 5.6 | Stable |
End of life |
| 7.0 | Stable |
End of life |
| 7.1 | Stable |
End of life |
| 7.2 | Stable |
Security fixes only |
| 7.3 | Stable |
Active |
| 7.4 | Stable |
Active |
| 8.0 | Experimental |
In development |
☁️ OS/Platform Support
| Virtual environment | matrix.operating-system |
|---|---|
| Windows Server 2019 | windows-latest or windows-2019 |
| Ubuntu 18.04 | ubuntu-latest or ubuntu-18.04 |
| Ubuntu 16.04 | ubuntu-16.04 |
| macOS X Catalina 10.15 | macos-latest or macOS-10.15 |
📝 Usage
Inputs supported by this GitHub Action.
- php-version
required - extensions
required - key
required
See action.yml and usage below for more info.
Cache extensions in a PHP workflow
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.2', '7.3', '7.4']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
env:
extensions: intl, pcov
key: cache-v1 # can be any string, change to clear the extension cache.
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup cache environment
id: cache-env
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
restore-keys: ${{ steps.cache-env.outputs.key }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ${{ env.extensions }}
📜 License
The scripts and documentation in this project are released under the MIT License. This project has multiple dependencies. Their licenses can be found in their respective repositories.
👍 Contributions
Contributions are welcome! See Contributor's Guide. If you face any issues while using this or want to suggest a feature/improvement, create an issue here.
💖 Support this project
If this action helped you.
- Please star the project and share it with the community.
- If you blog, write about your experience while using this action.
- I maintain this in my free time, please support me with a Patreon subscription or a one time contribution using Paypal.
- If you need any help using this, please contact me using Codementor
Description
Languages
Shell
72%
TypeScript
26.7%
JavaScript
1.3%