Skip to content

(WIP) test

(WIP) test #11

Workflow file for this run

name: sum
on:
- workflow_dispatch
- push
jobs:
one:
runs-on: ubuntu-latest
steps:
- run: exit 0
two:
runs-on: ubuntu-latest
steps:
- run: exit 1
three:
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- run: echo three
test-matrix:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- code: 0
- code: 1
steps:
- run: exit ${{ matrix.code }}
# https://github.com/actions/runner/issues/2566#issuecomment-1522574653
sum:
needs: [one, two, three, test-matrix]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- run: echo ${{ contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'failure') }}
# https://docs.github.com/en/actions/learn-github-actions/contexts#example-printing-context-information-to-the-log
- name: Debug
env:
DEBUG: ${{ toJSON(needs) }}
run: echo "$DEBUG"