mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30: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
|
name: Setup
|
||||||
description: 'Setup PHP, Composer, and NPM.'
|
description: Setup and Cache PHP, Composer, and NPM.
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
php-version:
|
php-version:
|
||||||
description: 'PHP version(s) to use.'
|
description: PHP version(s) to use.
|
||||||
required: true
|
required: true
|
||||||
php-extensions:
|
php-extensions:
|
||||||
description: 'PHP extensions to install.'
|
description: PHP extensions to install.
|
||||||
required: false
|
required: false
|
||||||
default: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, igbinary, msgpack, memcached, gmp, :php-psr
|
default: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, redis, igbinary, msgpack, memcached, gmp, :php-psr
|
||||||
redis-options:
|
redis-options:
|
||||||
description: 'Redis options to compile with.'
|
description: Redis options to compile with.
|
||||||
required: false
|
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
|
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:
|
redis-libs:
|
||||||
description: 'Redis libraries to install.'
|
description: Redis libraries to install.
|
||||||
required: false
|
required: false
|
||||||
default: liblz4-dev, liblzf-dev, libzstd-dev
|
default: liblz4-dev, liblzf-dev, libzstd-dev
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Get PHP Extension Cache Hash
|
- name: Get PHP Extension Cache Hash
|
||||||
id: php-ext-cache-hash
|
id: php-ext-cache-hash
|
||||||
|
with:
|
||||||
|
PHP_EXTENSIONS: ${{ inputs.php-extensions }}
|
||||||
|
REDIS_OPTIONS: ${{ inputs.redis-options }}
|
||||||
|
REDIS_LIBS: ${{ inputs.redis-libs }}
|
||||||
run: |
|
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
|
echo hash=$(echo $concat_values | md5sum | awk '{print $1}') >> $GITHUB_OUTPUT
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Setup Cache Environment
|
- name: Setup Cache Environment
|
||||||
id: php-ext-cache
|
id: php-ext-cache
|
||||||
uses: shivammathur/cache-extensions@v1
|
uses: shivammathur/cache-extensions@v1
|
||||||
|
if: inputs.php-extensions == true && inputs.redis-options == true && inputs.redis-libs == true
|
||||||
with:
|
with:
|
||||||
php-version: ${{ input.php-version }}
|
php-version: ${{ inputs.php-version }}
|
||||||
extensions: ${{ input.php-extensions }}
|
extensions: ${{ inputs.php-extensions }}
|
||||||
key: ${{ runner.os }}-php-ext-${{ steps.php-ext-cache-hash.outputs.hash }}
|
key: ${{ runner.os }}-php-ext-${{ steps.php-ext-cache-hash.outputs.hash }}
|
||||||
|
|
||||||
- name: Cache PHP Extensions
|
- name: Cache PHP Extensions
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
if: inputs.php-extensions == true && inputs.redis-options == true && inputs.redis-libs == true
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.php-ext-cache.outputs.dir }}
|
path: ${{ steps.php-ext-cache.outputs.dir }}
|
||||||
key: ${{ steps.php-ext-cache.outputs.key }}
|
key: ${{ steps.php-ext-cache.outputs.key }}
|
||||||
@ -45,14 +52,14 @@ runs:
|
|||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ input.php-version }}
|
php-version: ${{ inputs.php-version }}
|
||||||
extensions: ${{ input.php-extensions }}
|
extensions: ${{ inputs.php-extensions }}
|
||||||
ini-values: error_reporting=E_ALL
|
ini-values: error_reporting=E_ALL
|
||||||
tools: composer:v2
|
tools: composer:v2
|
||||||
coverage: none
|
coverage: none
|
||||||
env:
|
env:
|
||||||
REDIS_CONFIGURE_OPTS: ${{ input.redis-options }}
|
REDIS_CONFIGURE_OPTS: ${{ inputs.redis-options }}
|
||||||
REDIS_LIBS: liblz4-dev, liblzf-dev, libzstd-dev
|
REDIS_LIBS: ${{ inputs.redis-libs }}
|
||||||
|
|
||||||
- name: Get Composer Cache Directory
|
- name: Get Composer Cache Directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user