diff --git a/actions/read-matrix-status/action.yml b/actions/read-matrix-status/action.yml new file mode 100644 index 0000000..82f5931 --- /dev/null +++ b/actions/read-matrix-status/action.yml @@ -0,0 +1,22 @@ +name: Read matrix status + +outputs: + status: + description: "Matrix status (success|failure)" + value: ${{ steps.matrix-status.outputs.status }} + +runs: + using: composite + steps: + - uses: actions/download-artifact@v3 + with: + name: matrix-status + + - name: Read matrix status + id: matrix-status + shell: bash + run: echo status=$([ $(grep -h -v "success" matrix-status-*.txt | wc -l) -eq 0 ] && echo "success" || echo "failure") >> "$GITHUB_OUTPUT" + + - name: Remove files with statuses + shell: bash + run: rm matrix-status-*.txt \ No newline at end of file diff --git a/actions/save-matrix-status/action.yml b/actions/save-matrix-status/action.yml new file mode 100644 index 0000000..cbe9abf --- /dev/null +++ b/actions/save-matrix-status/action.yml @@ -0,0 +1,17 @@ +name: Save matrix status + +inputs: + job-id: + required: true + +runs: + using: composite + steps: + - name: Save status + shell: bash + run: echo ${{ job.status }} > matrix-status-${{ inputs.job-id }}.txt + + - uses: actions/upload-artifact@v3 + with: + name: matrix-status + path: matrix-status-${{ inputs.job-id }}.txt \ No newline at end of file