diff --git a/.github/workflows/php-fpm.yml b/.github/workflows/php-fpm.yml index c7f7693..50632d2 100644 --- a/.github/workflows/php-fpm.yml +++ b/.github/workflows/php-fpm.yml @@ -43,13 +43,13 @@ jobs: - name: Get all PHP lanes id: get-lanes run: | - echo "lanes=$(find php-fpm -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | jq -R . | jq -s .)" >> $GITHUB_OUTPUT + echo "lanes=$(find php-fpm -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | jq -c -R . | jq -c -s .)" >> $GITHUB_OUTPUT shell: bash - name: Get changed PHP lanes id: changed-lanes run: | - changed_lanes=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr ' ' '\n' | grep '^php-fpm/' | cut -d'/' -f2 | sort -u | jq -R . | jq -s .) + changed_lanes=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr ' ' '\n' | grep '^php-fpm/' | cut -d'/' -f2 | sort -u | jq -c -R . | jq -c -s .) echo "lanes=${changed_lanes:-[]}" >> $GITHUB_OUTPUT shell: bash @@ -72,9 +72,9 @@ jobs: result-encoding: json script: | const req_lane = "${{ github.event.inputs.lane }}"; - const build_all = ${{ steps.build-all-check.outputs.build_all === 'true' }}; - const all_lanes = JSON.parse('${{ steps.get-lanes.outputs.lanes }}'); - const changed_lanes = JSON.parse('${{ steps.changed-lanes.outputs.lanes }}'); + const build_all = ${{ steps.build-all-check.outputs.build_all == 'true' }}; + const all_lanes = JSON.parse('${{ steps.get-lanes.outputs.lanes }}' || '[]'); + const changed_lanes = JSON.parse('${{ steps.changed-lanes.outputs.lanes }}' || '[]'); let lanes_to_build = [];