chore(workflow): 🔧 check if condition earlier

This commit is contained in:
alistair3149 2024-05-25 02:22:53 -04:00
parent d6e996b09f
commit 6c996b7fff
No known key found for this signature in database

View file

@ -103,13 +103,12 @@ jobs:
npm run lint:i18n
- name: Trigger PHP tests
if: steps.changed-php.outputs.any_changed == 'true'
run: |
if [ steps.changed-php.outputs.any_changed == 'true' ]; then
curl -X POST -H "Authorization: token ${{ secrets.WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/StarCitizenTools/mediawiki-skins-Citizen/actions/workflows/php-tests.yaml/dispatches \
-d '{"ref":"main"}'
fi
curl -X POST -H "Authorization: token ${{ secrets.WORKFLOW_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/StarCitizenTools/mediawiki-skins-Citizen/actions/workflows/php-tests.yaml/dispatches \
-d '{"ref":"main"}'
# Only patch code when it is a push event
- name: Push the changes