php-fpm: hereee we go againnn
This commit is contained in:
10
.github/workflows/php-fpm.yml
vendored
10
.github/workflows/php-fpm.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
lanes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
matrix: ${{ steps.set-matrix.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
- 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 'if . == [] then [] else . end')
|
||||
changed_lanes=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr ' ' '\n' | grep '^php-fpm/' | cut -d'/' -f2 | sort -u | jq -R . | jq -s .)
|
||||
echo "lanes=${changed_lanes:-[]}" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
@@ -69,9 +69,10 @@ jobs:
|
||||
id: set-matrix
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
result-encoding: json
|
||||
script: |
|
||||
const req_lane = "${{ github.event.inputs.lane }}";
|
||||
const build_all = ${{ steps.build-all-check.outputs.build_all }};
|
||||
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 }}');
|
||||
|
||||
@@ -90,11 +91,10 @@ jobs:
|
||||
}
|
||||
|
||||
return { lane: lanes_to_build };
|
||||
result-encoding: json
|
||||
|
||||
build:
|
||||
needs: lanes
|
||||
if: ${{ needs.lanes.outputs.matrix.lane[0] }}
|
||||
if: ${{ needs.lanes.outputs.matrix != '' && needs.lanes.outputs.matrix.lane[0] }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
Reference in New Issue
Block a user