Add action.yml
This commit is contained in:
commit
270f6a054a
32
action.yml
Normal file
32
action.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user