33 lines
902 B
YAML
33 lines
902 B
YAML
name: Setup composer
|
|
description: Install and cache composer dependencies
|
|
author: Jamie Schouten
|
|
inputs:
|
|
file:
|
|
description: 'file to hash for cache key'
|
|
required: false
|
|
default: 'composer.lock'
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Auth registry
|
|
run: composer config --global http-basic.git.qlic.nl ${{ secrets.REGISTRY_USERNAME }} ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Get Composer Cache Directory
|
|
id: composer-cache
|
|
run: |
|
|
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/${{ inputs.file }}') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-composer-
|
|
|
|
- name: Install dependencies
|
|
run: composer install
|