0

I have configured 2 jobs that I want to run. The first job does the actual building of my software on multiple configurations. On my second job I want to wait until the first set of jobs complete, and then post to a slack channel the summary of my job.

I found a method by using needs to accomplish this task however I am stuck when it comes to actually obtaining the status of each individual task and not just a global status.

For example I have something as follows

name: Build and test

jobs:
  build-and-test:
    strategy:
      matrix:
        config:
          - name: 'Ubuntu 18.04'
            runner: 'ubuntu-18.04'
            id: 'u18'

          - name: 'Ubuntu 20.04'
            runner: 'ubuntu-20.04'
            id: 'u20'

      fail-fast: false

    runs-on: ${{ matrix.config.runner }}

    steps:
      - name: Step 1
        id: step1
        run: |
          echo "To be filled in"

      - name: Step 2
        id: step2
        run: |
          echo "To be filled in"

  webhook-update:
    needs: build-and-test
    if: always()
    runs-on: [ubuntu-20.04]
    steps:
      - name: Send webhook update for all jobs
        run: |
          # In the future will push to slash, but for now using echo
          echo ${{ needs.build-and-test.results }}
          # Ideally I want to also have access to something like u18.results and u20.results
Sacha
  • 9

0 Answers0