Skip to content

Commit 63ce644

Browse files
authored
Merge pull request #12 from packagist/add-optional-composer-require-step
Add optional composer require step to modify the composer.json file
2 parents bbdfb17 + 4dfaeea commit 63ce644

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ runs:
3434
shell: "bash"
3535
run: "${GITHUB_ACTION_PATH}/bin/composer_version_check.sh ${{ github.event.client_payload.requirements.minimumComposerVersion }}"
3636

37-
- name: Configure Composer Authentication
37+
- name: Configure Composer authentication
3838
shell: "bash"
3939
if: ${{ github.event.client_payload.composerAuthentication.type == 'environment' }}
4040
run: echo 'COMPOSER_AUTH=${{ github.event.client_payload.composerAuthentication.environment }}' >> "$GITHUB_ENV"
@@ -44,6 +44,12 @@ runs:
4444
with:
4545
working-directory: "${{ github.event.client_payload.workingDirectory }}"
4646

47+
- name: Modify requirements in the composer.json
48+
run: "${{ github.event.client_payload.requireCommand.plain }}"
49+
if: ${{ github.event.client_payload.requireCommand }}
50+
shell: bash
51+
working-directory: "${{ github.event.client_payload.workingDirectory }}"
52+
4753
- name: Composer update
4854
run: "${{ github.event.client_payload.updateCommand.plain }}"
4955
shell: bash
@@ -86,7 +92,7 @@ runs:
8692
env:
8793
BRANCH: ${{ github.event.client_payload.branch }}
8894

89-
- name: Call webhook from Private Packagist to create the PR
95+
- name: Call webhook from Private Packagist to create the pull request
9096
shell: bash
9197
run: "curl -fsSL -X POST -u ${{ github.event.client_payload.webhook.authentication.username }}:${{ github.event.client_payload.webhook.authentication.password }} --header \"Content-Type: application/json\" --data '{\"runId\":\"${{github.run_id}}\",\"numberOfChangedFiles\":\"${{ steps.number_of_changed_files.outputs.COUNT }}\",\"versions\":{\"ciScriptVersion\":\"1.2.0\"}}' ${{ github.event.client_payload.webhook.executedUrl }}"
9298

0 commit comments

Comments
 (0)