mirror of
https://github.com/ivuorinen/.github.git
synced 2026-01-26 11:23:57 +00:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
name: Run Composer Install
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- "composer.json"
|
|
- "composer.lock"
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
statuses: read
|
|
|
|
jobs:
|
|
ComposerInstall:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: read
|
|
statuses: write
|
|
|
|
strategy:
|
|
matrix:
|
|
operating-system: ["ubuntu-latest"]
|
|
php: ["8.1", "8.2", "8.3", "8.4"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-php-${{ matrix.php }}-
|
|
${{ runner.os }}-php-
|
|
|
|
- name: Composer (PHP ${{ matrix.php }})
|
|
uses: php-actions/composer@v6
|
|
with:
|
|
php_version: ${{ matrix.php }}
|
|
args: --no-progress --prefer-dist --optimize-autoloader
|