Skip to content

Commit

Permalink
Merge pull request #22 from Aleksey28/main
Browse files Browse the repository at this point in the history
github-actions: added actions for works with matrix status
  • Loading branch information
miherlosev authored Aug 21, 2023
2 parents df5113c + f32b6ad commit 76771a7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
22 changes: 22 additions & 0 deletions actions/read-matrix-status/action.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions actions/save-matrix-status/action.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 76771a7

Please sign in to comment.