Skip to content

Commit

Permalink
Add PHP build and test composite actions
Browse files Browse the repository at this point in the history
  • Loading branch information
admdly committed Dec 4, 2023
1 parent 1422a3f commit cf6a6e5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/actions/php-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'PHP Build'
description: ''
inputs:
cache-deps:
description: ''
required: false
default: true
composer-args:
description: ''
required: false
default: ''
php-version:
description: ''
required: false
default: 'latest'
runs:
using: 'composite'
steps:
- name: 'Validate composer.json and composer.lock'
uses: php-actions/composer@v6
with:
command: validate
php_version: ${{ inputs.php-version }}

- name: 'Cache Composer Dependencies'
id: composer-cache
if: ${{ inputs.cache-deps }}
uses: actions/cache@v3
with:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
path: './src/vendor'

- name: 'Install Composer Dependencies'
if: ${{ steps.composer-cache.outputs.cache-hit != 'true' }}
uses: php-actions/composer@v6
with:
args: ${{ inputs.composer-args }}
php_version: ${{ inputs.php-version }}
Empty file.

0 comments on commit cf6a6e5

Please sign in to comment.