mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
Fixes issues in custom CI action
This commit is contained in:
parent
c97f6a4245
commit
4b7a01ee7a
31
.github/action/setup/action.yml
vendored
31
.github/action/setup/action.yml
vendored
@ -1,42 +1,49 @@
|
||||
name: Setup
|
||||
description: 'Setup PHP, Composer, and NPM.'
|
||||
description: Setup and Cache PHP, Composer, and NPM.
|
||||
|
||||
inputs:
|
||||
php-version:
|
||||
description: 'PHP version(s) to use.'
|
||||
description: PHP version(s) to use.
|
||||
required: true
|
||||
php-extensions:
|
||||
description: 'PHP extensions to install.'
|
||||
description: PHP extensions to install.
|
||||
required: false
|
||||
default: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, igbinary, msgpack, memcached, gmp, :php-psr
|
||||
redis-options:
|
||||
description: 'Redis options to compile with.'
|
||||
description: Redis options to compile with.
|
||||
required: false
|
||||
default: --enable-redis --enable-redis-igbinary --enable-redis-msgpack --enable-redis-lzf --with-liblzf --enable-redis-zstd --with-libzstd --enable-redis-lz4 --with-liblz4
|
||||
redis-libs:
|
||||
description: 'Redis libraries to install.'
|
||||
description: Redis libraries to install.
|
||||
required: false
|
||||
default: liblz4-dev, liblzf-dev, libzstd-dev
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Get PHP Extension Cache Hash
|
||||
id: php-ext-cache-hash
|
||||
with:
|
||||
PHP_EXTENSIONS: ${{ inputs.php-extensions }}
|
||||
REDIS_OPTIONS: ${{ inputs.redis-options }}
|
||||
REDIS_LIBS: ${{ inputs.redis-libs }}
|
||||
run: |
|
||||
concat_values="${PHP_EXTENSIONS}${REDIS_CONFIGURE_OPTS}${REDIS_LIBS}"
|
||||
concat_values="${PHP_EXTENSIONS}${REDIS_OPTIONS}${REDIS_LIBS}"
|
||||
echo hash=$(echo $concat_values | md5sum | awk '{print $1}') >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- name: Setup Cache Environment
|
||||
id: php-ext-cache
|
||||
uses: shivammathur/cache-extensions@v1
|
||||
if: inputs.php-extensions == true && inputs.redis-options == true && inputs.redis-libs == true
|
||||
with:
|
||||
php-version: ${{ input.php-version }}
|
||||
extensions: ${{ input.php-extensions }}
|
||||
php-version: ${{ inputs.php-version }}
|
||||
extensions: ${{ inputs.php-extensions }}
|
||||
key: ${{ runner.os }}-php-ext-${{ steps.php-ext-cache-hash.outputs.hash }}
|
||||
|
||||
- name: Cache PHP Extensions
|
||||
uses: actions/cache@v4
|
||||
if: inputs.php-extensions == true && inputs.redis-options == true && inputs.redis-libs == true
|
||||
with:
|
||||
path: ${{ steps.php-ext-cache.outputs.dir }}
|
||||
key: ${{ steps.php-ext-cache.outputs.key }}
|
||||
@ -45,14 +52,14 @@ runs:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ input.php-version }}
|
||||
extensions: ${{ input.php-extensions }}
|
||||
php-version: ${{ inputs.php-version }}
|
||||
extensions: ${{ inputs.php-extensions }}
|
||||
ini-values: error_reporting=E_ALL
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
env:
|
||||
REDIS_CONFIGURE_OPTS: ${{ input.redis-options }}
|
||||
REDIS_LIBS: liblz4-dev, liblzf-dev, libzstd-dev
|
||||
REDIS_CONFIGURE_OPTS: ${{ inputs.redis-options }}
|
||||
REDIS_LIBS: ${{ inputs.redis-libs }}
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
|
Loading…
x
Reference in New Issue
Block a user