fountainhead / action-wait-for-check

A GitHub Action that waits for another Check Run to have completed
MIT License
122 stars 44 forks source link

Feature Request: Support wildcard for checkName #10

Open dakaneye opened 3 years ago

dakaneye commented 3 years ago

If waiting for a series of checks run against a matrix (i.e. tests), you have to add a check step for each individual job in that matrix.

Example workflow snippet:

      - name: Check acceptance test results (helm)
        uses: fountainhead/action-wait-for-check@v1.0.0
        id: acceptance-helm-1-13-12
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          checkName: "Acceptance-Helm (v1.13.12)"
          ref: ${{ github.event.pull_request.head.sha || github.sha }}

      - name: Check acceptance test results (helm)
        uses: fountainhead/action-wait-for-check@v1.0.0
        id: acceptance-helm-1-18-0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          checkName: "Acceptance-Helm (v1.18.0)"
          ref: ${{ github.event.pull_request.head.sha || github.sha }}
wms commented 3 years ago

I've not tested this use-case, but if you were to execute the wait-for-check action inside a Matrix that matches the shape of the one you're trying to observe, you might be able to use string interpolation inside with.checkName in order to dynamically reference each parallel segment. Hope that makes sense and works out for you.