Github actions / Run job after matrix is done

Viewed 971

I have this situation:

jobs:
  shake:
    name: 'NodeJS ${{ matrix.node }}'
    runs-on: ubuntu-latest
    strategy:
      matrix:
        fruit: [strawberry, banana, apple]

    steps:
      - run: echo "::set-output name=action_fruit::${{ matrix.fruit }}"

I'd love to execute a job or step once the entire matrix is over.

  • I should be able to run the job/step regardless of the failure
  • I should also be able to access their output.
2 Answers

I did that: you must add a needs clause in the following job, e.g.

jobs:
  shake:
    ...
  post_shake:
    needs: [shake]
    steps:
      ...
Related