diff --git a/.github/workflows/import.yaml b/.github/workflows/import.yaml index 2f32d1081d20c..4efa2b3598533 100644 --- a/.github/workflows/import.yaml +++ b/.github/workflows/import.yaml @@ -347,6 +347,51 @@ jobs: commit_message: import WorkflowHub data branch: workflowhub-import-branch create_branch: true + notify: + # Runs whatever the importers did: a failure opens or updates the tracking + # issue for that resource, and a success closes it again. Parallel to + # merge-imports, so it neither delays nor depends on the merge. + runs-on: ubuntu-latest + needs: + - biotools + - openebench + - bioconda + - biii + - biocontainers + - galaxytool + - debian-med + - bioconductor + - workflowhub + if: always() + permissions: + # A job-level permissions map sets every scope it does not mention to + # none, so each one the action needs is spelled out: + # issues reading, opening, commenting on and closing the tracking + # issue, and creating its label + # actions listing this workflow's runs, to tell whether a newer one + # has started. Without it that check is refused; the action + # carries on and says so in the job summary, but the + # stale-run guard is gone. + # `contents` is not needed: there is no checkout, since the action + # brings its own script. + issues: write + actions: read + concurrency: + # find-then-create is not atomic across runners, so serialise the + # notifier: a manual dispatch overlapping the schedule would otherwise + # let two runs open duplicate issues for the same outage. + group: notify-upstream-failures + cancel-in-progress: false + steps: + - name: report importer outcomes + uses: research-software-ecosystem/utils/notify-upstream-failures@main + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + # The keys are this job's `needs`, which the action matches against + # its table of upstream resources. A job missing from that table is + # reported as unprobed rather than passing unnoticed. + job-results: ${{ toJSON(needs) }} + workflow-file: import.yaml merge-imports: runs-on: ubuntu-latest needs: