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:
|
lanes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
matrix: ${{ steps.set-matrix.outputs.result }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -49,7 +49,7 @@ jobs:
|
|||||||
- name: Get changed PHP lanes
|
- name: Get changed PHP lanes
|
||||||
id: changed-lanes
|
id: changed-lanes
|
||||||
run: |
|
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
|
echo "lanes=${changed_lanes:-[]}" >> $GITHUB_OUTPUT
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
@@ -69,9 +69,10 @@ jobs:
|
|||||||
id: set-matrix
|
id: set-matrix
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
|
result-encoding: json
|
||||||
script: |
|
script: |
|
||||||
const req_lane = "${{ github.event.inputs.lane }}";
|
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 all_lanes = JSON.parse('${{ steps.get-lanes.outputs.lanes }}');
|
||||||
const changed_lanes = JSON.parse('${{ steps.changed-lanes.outputs.lanes }}');
|
const changed_lanes = JSON.parse('${{ steps.changed-lanes.outputs.lanes }}');
|
||||||
|
|
||||||
@@ -90,11 +91,10 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
return { lane: lanes_to_build };
|
return { lane: lanes_to_build };
|
||||||
result-encoding: json
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: lanes
|
needs: lanes
|
||||||
if: ${{ needs.lanes.outputs.matrix.lane[0] }}
|
if: ${{ needs.lanes.outputs.matrix != '' && needs.lanes.outputs.matrix.lane[0] }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|||||||
Reference in New Issue
Block a user