|
|
|
@ -35,21 +35,6 @@ runs: |
|
|
|
|
run: | |
|
|
|
|
composer config --global github-oauth.github.com "${{ github.token }}" |
|
|
|
|
|
|
|
|
|
- name: Setup Composer root version |
|
|
|
|
if: ${{ github.ref_type == 'branch' }} |
|
|
|
|
shell: bash |
|
|
|
|
working-directory: ${{ inputs.path }} |
|
|
|
|
run: | |
|
|
|
|
COMPOSER_ROOT_VERSION= |
|
|
|
|
|
|
|
|
|
if [ -z "$(composer config extra.branch-alias."dev-${GITHUB_HEAD_REF:-GITHUB_REF_NAME}" 2> /dev/null)" ]; then |
|
|
|
|
COMPOSER_ROOT_VERSION="$(php -r " |
|
|
|
|
require('./lib/Pico.php'); |
|
|
|
|
echo preg_replace('/\.[0-9]+-dev$/', '.x-dev', Pico::VERSION); |
|
|
|
|
")" |
|
|
|
|
echo "COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION" | tee -a "$GITHUB_ENV" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
- name: Get Composer cache directory |
|
|
|
|
shell: bash |
|
|
|
|
working-directory: ${{ inputs.path }} |
|
|
|
@ -65,6 +50,26 @@ runs: |
|
|
|
|
restore-keys: | |
|
|
|
|
${{ runner.os }}-composer- |
|
|
|
|
|
|
|
|
|
- name: Setup Composer root version |
|
|
|
|
if: ${{ github.ref_type == 'branch' }} |
|
|
|
|
shell: bash |
|
|
|
|
working-directory: ${{ inputs.path }} |
|
|
|
|
run: | |
|
|
|
|
COMPOSER_ROOT_VERSION= |
|
|
|
|
|
|
|
|
|
COMPOSER_ROOT_VERSION="$(composer config \ |
|
|
|
|
extra.branch-alias."dev-${GITHUB_HEAD_REF:-GITHUB_REF_NAME}" \ |
|
|
|
|
2> /dev/null)" |
|
|
|
|
|
|
|
|
|
if [ -z "$COMPOSER_ROOT_VERSION" ]; then |
|
|
|
|
COMPOSER_ROOT_VERSION="$(php -r " |
|
|
|
|
require('./lib/Pico.php'); |
|
|
|
|
echo preg_replace('/\.[0-9]+-dev$/', '.x-dev', Pico::VERSION); |
|
|
|
|
")" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
echo "COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION" | tee -a "$GITHUB_ENV" |
|
|
|
|
|
|
|
|
|
- name: Install Composer dependencies |
|
|
|
|
shell: bash |
|
|
|
|
working-directory: ${{ inputs.path }} |
|
|
|
|