Skip to content

Commit

Permalink
Test success with output
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jan 10, 2025
1 parent 4624987 commit e962c54
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test output

on:
push:

jobs:
matrix:
runs-on: ubuntu-24.04
name: Matrix
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
version:
- '1'
- '2'
- '3'

outputs:
success: ${{ steps.success.outputs.success }}

steps:
- id: success
run: echo "::set-output name=success::true"

error:
runs-on: ubuntu-24.04
name: Error
timeout-minutes: 15

steps:
- run: 'false'

success:
runs-on: ubuntu-24.04
name: Success
timeout-minutes: 15
if: always()
needs:
- matrix
- error

steps:
- run: echo ${{ needs.matrix.outputs.success }}
- run: '[[ "${{ needs.matrix.outputs.success-1 }}" == "true" ]]'
- run: '[[ "${{ needs.matrix.outputs.success-2 }}" == "true" ]]'
- run: '[[ "${{ needs.matrix.outputs.success-3 }}" == "true" ]]'
- run: '[[ "${{ needs.error.outputs.success }}" == "true" ]]'

0 comments on commit e962c54

Please sign in to comment.