forked from nelmio/NelmioApiDocBundle
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81fe17d
commit 835284b
Showing
3 changed files
with
66 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Composer setup | ||
description: Setup, install and cache Composer dependencies | ||
|
||
inputs: | ||
symfony-version: | ||
description: The required Symfony version that will be installed | ||
required: false | ||
type: string | ||
|
||
install-doctrine-annotations: | ||
description: If the doctrine/annotations package should be additionally installed as a dev dependency | ||
required: true | ||
type: boolean | ||
|
||
composer-flags: | ||
description: Additional flags that are passed to the `composer install` step | ||
required: false | ||
type: string | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Get Composer cache directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Cache Composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
${{ runner.os }}-composer- | ||
- name: Install doctrine/annotations | ||
if: ${{ inputs.install-doctrine-annotations }} | ||
run: composer require --dev --no-update doctrine/annotations | ||
shell: bash | ||
|
||
- name: Remove packages not compatible Symfony 7 | ||
if: ${{ inputs.symfony-version == '7.0.*' }} | ||
run: composer remove --dev --no-update friendsofsymfony/rest-bundle sensio/framework-extra-bundle | ||
shell: bash | ||
|
||
- name: Install dependencies with Composer | ||
env: | ||
SYMFONY_REQUIRE: ${{ inputs.symfony-version }} | ||
run: composer update --no-interaction --no-progress ${{ inputs.composer-flags }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.