{"id":19943208,"url":"https://github.com/root-project/annotation-failure-action","last_synced_at":"2025-10-09T08:35:16.569Z","repository":{"id":176913130,"uuid":"659729502","full_name":"root-project/annotation-failure-action","owner":"root-project","description":"GitHub action that extends the usage of workflow annotations","archived":false,"fork":false,"pushed_at":"2023-06-29T14:37:11.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-28T00:40:20.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/root-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-28T12:41:59.000Z","updated_at":"2023-06-28T21:04:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e608f15-60ea-405b-842c-28a332eedb00","html_url":"https://github.com/root-project/annotation-failure-action","commit_stats":null,"previous_names":["root-project/annotation-features"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/root-project/annotation-failure-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Fannotation-failure-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Fannotation-failure-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Fannotation-failure-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Fannotation-failure-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/root-project","download_url":"https://codeload.github.com/root-project/annotation-failure-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root-project%2Fannotation-failure-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001055,"owners_count":26082991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T00:15:47.933Z","updated_at":"2025-10-09T08:35:16.541Z","avatar_url":"https://github.com/root-project.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Annotation Failure Action\n\n![image](https://github.com/root-project/annotation-failure-action/assets/82065181/60807959-311b-48ef-9122-9654e2fc7836)\n\n\nCauses the build to fail if certain annotations are created. This is useful in \nconjuntion with\n[problem matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md)\nto fail the workflow on compiler warnings without enabling `-Werror`.\n\n## Inputs\n\n### GH\\_TOKEN\n\n**required** This workflow requires an access token with yet to be determined permissions to\nread annotations (but likely `checks` and `actions`).\n\n### workflow\\_id\n\n**required** The id of the workflow to check annotations for. For jobs checking their own\nannotations, `${{ github.run_id }}` works. For jobs triggered by `workflow_run`,\n`${{ github.event.workflow_run.id }}` finds the `run_id` of the run that\ntriggered this run.\n\n### filter\n\n**optional** A regex filter that causes job failures when it's (partially) matching\nan annotation whose severity is 'warning' or higher. It matches against the\nannotation's title and message concatinated.\nWithout a filter, any annotation of severity warning or higher causes a build\nfailure.\n\nA useful regex for gcc is `\\[-W[A-Za-z\\-]+?\\]`.\nThis matches the diagnostic flag hints such as `[-Wdeprecated-declarations]` in `warning: ‘D’ is deprecated [-Wdeprecated-declarations]`.\nAn alternative would be to search for `warning: ` and alike.\n\n## Example usage\n\nCheck for annotations within the same workflow\n```yaml\n  matrix-build-step-with-problem-matcher:\n    [...]\n\n  assert-annotations:\n    name: Check for compiler warnings\n    needs: [matrix-build-step-with-problem-matcher]\n    runs-on: ubuntu-latest\n\n    permissions:\n      checks: write\n      pull-requests: write\n      actions: read\n\n    steps:\n      - name: Check for gcc compiler warnings\n        env:\n          filter: '\\[-W[A-Za-z\\-]+?\\]'\n          workflow_id: ${{ github.run_id }}\n          GH_TOKEN: ${{ github.token }}\n        uses: root-project/annotation-failure-action@main\n```\n\nCheck for annotations from a different workflow using `on: workflow_run`.\n```yaml\nname: Read annotations\n\non:\n  workflow_run:\n    workflows: [annotation-creating-workflow]\n    types:\n      - completed\n\njobs:\n  read_annotations:\n    name: Check for compiler warnings\n\n    runs-on: ubuntu-latest\n\n    permissions:\n      checks: write\n      pull-requests: write\n      actions: read\n\n    steps:\n      - name: Check for annotations in the run that triggered this\n        env:\n          workflow_id: ${{ github.event.workflow_run.id }}\n          GH_TOKEN: ${{ github.token }}\n        uses: root-project/annotation-failure-action@main\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot-project%2Fannotation-failure-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froot-project%2Fannotation-failure-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot-project%2Fannotation-failure-action/lists"}