1- name : " Configure tokens for private packages and install PHP Dependencies with Composer using optionally dependencies.json "
1+ name : " Prepare composer using ./ibexa/gh-workflows/actions/prepare-composer action and execute composer install "
22author : ' Ibexa AS'
33description : >-
4- Configures GitHub App tokens and installs PHP dependencies using Composer.
5- If a dependencies.json file is present, it updates composer.json accordingly before installation.
4+ Runs ./ibexa/gh-workflows/actions/prepare-composer action with the same input
5+ and then runs ramsey/ composer-install action
66
77inputs :
88 gh-client-id :
@@ -21,50 +21,22 @@ inputs:
2121 description : ' Comma-separated list of PHP extensions to install'
2222 required : false
2323 default : ' pdo_sqlite, gd'
24+ dependency-versions :
25+ description : ' Dependency version resolution strategy (lowest, highest, or locked)'
26+ required : false
27+ default : ' highest'
2428
2529runs :
2630 using : " composite"
2731 steps :
28- - uses : actions/create-github-app-token@v2
29- id : generate_token
30- with :
31- app-id : ${{ inputs.gh-client-id }}
32- private-key : ${{ inputs.gh-client-secret }}
33- owner : ${{ github.repository_owner }}
34-
35- - name : Setup PHP Action
36- uses : shivammathur/setup-php@v2
32+ - uses : ./actions/prepare-composer
3733 with :
38- php-version : ${{ matrix.php }}
39- coverage : none
40- extensions : ${{ inputs.php-extensions }}
41- tools : cs2pr
42-
43- - if : ${{ inputs.satis-network-key != '' && inputs.satis-network-token != '' }}
44- name : Add composer keys for private packagist
45- shell : bash
46- run : composer config http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN
47- env :
48- SATIS_NETWORK_KEY : ${{ inputs.satis-network-key }}
49- SATIS_NETWORK_TOKEN : ${{ inputs.satis-network-token }}
50-
51- - if : steps.generate_token.outputs.token != ''
52- name : Add composer key for GitHub App
53- shell : bash
54- run : composer config github-oauth.github.com $GITHUB_TOKEN
55- env :
56- GITHUB_TOKEN : ${{ steps.generate_token.outputs.token }}
57-
58- - name : ' Process dependencies.json and update composer.json'
59- shell : bash
60- run : |
61- if [[ -f dependencies.json ]]
62- then
63- "${GITHUB_ACTION_PATH}/composer-replace-dependencies.bash" dependencies.json
64- fi
65- env :
66- GITHUB_ACTION_PATH : ${{ github.action_path }}
34+ gh-client-id : ${{ inputs.gh-client-id }}
35+ gh-client-secret : ${{ inputs.gh-client-secret }}
36+ satis-network-key : ${{ inputs.satis-network-key }}
37+ satis-network-token : ${{ inputs.satis-network-token }}
38+ php-extensions : ${{ inputs.php-extensions }}
6739
6840 - uses : ramsey/composer-install@v3
6941 with :
70- dependency-versions : highest
42+ dependency-versions : ${{ inputs.dependency-versions }}
0 commit comments