{"id":27194858,"url":"https://github.com/cssnr/check-build-action","last_synced_at":"2026-05-18T02:33:06.595Z","repository":{"id":283577111,"uuid":"952174800","full_name":"cssnr/check-build-action","owner":"cssnr","description":"Action to Check if the provided Build command was run and Optionally Comment on the PR.","archived":false,"fork":false,"pushed_at":"2025-11-08T18:06:52.000Z","size":867,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-08T19:21:45.675Z","etag":null,"topics":["actions"],"latest_commit_sha":null,"homepage":"https://actions.cssnr.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cssnr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"cssnr"}},"created_at":"2025-03-20T21:15:21.000Z","updated_at":"2025-11-08T18:06:54.000Z","dependencies_parsed_at":"2025-08-11T09:18:17.960Z","dependency_job_id":"a9f8d886-6803-4c68-b1d6-e178f42ab5b0","html_url":"https://github.com/cssnr/check-build-action","commit_stats":null,"previous_names":["cssnr/check-build-action"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/cssnr/check-build-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fcheck-build-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fcheck-build-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fcheck-build-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fcheck-build-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssnr","download_url":"https://codeload.github.com/cssnr/check-build-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fcheck-build-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33162622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"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":["actions"],"created_at":"2025-04-09T19:44:01.085Z","updated_at":"2026-05-18T02:33:06.589Z","avatar_url":"https://github.com/cssnr.png","language":"JavaScript","funding_links":["https://ko-fi.com/cssnr"],"categories":[],"sub_categories":[],"readme":"[![GitHub Tag Major](https://img.shields.io/github/v/tag/cssnr/check-build-action?sort=semver\u0026filter=!v*.*\u0026logo=git\u0026logoColor=white\u0026labelColor=585858\u0026label=%20)](https://github.com/cssnr/check-build-action/tags)\n[![GitHub Tag Minor](https://img.shields.io/github/v/tag/cssnr/check-build-action?sort=semver\u0026filter=!v*.*.*\u0026logo=git\u0026logoColor=white\u0026labelColor=585858\u0026label=%20)](https://github.com/cssnr/check-build-action/releases)\n[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/check-build-action?logo=git\u0026logoColor=white\u0026labelColor=585858\u0026label=%20)](https://github.com/cssnr/check-build-action/releases/latest)\n[![GitHub Dist Size](https://img.shields.io/github/size/cssnr/check-build-action/dist%2Findex.js?logo=bookstack\u0026logoColor=white\u0026label=dist%20size)](https://github.com/cssnr/check-build-action/blob/master/src)\n[![Action Run Using](https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcssnr%2Fcheck-build-action%2Frefs%2Fheads%2Fmaster%2Faction.yml\u0026query=%24.runs.using\u0026logo=githubactions\u0026logoColor=white\u0026label=runs)](https://github.com/cssnr/check-build-action/blob/master/action.yml)\n[![Workflow Release](https://img.shields.io/github/actions/workflow/status/cssnr/check-build-action/release.yaml?logo=cachet\u0026label=release)](https://github.com/cssnr/check-build-action/actions/workflows/release.yaml)\n[![Workflow Test](https://img.shields.io/github/actions/workflow/status/cssnr/check-build-action/test.yaml?logo=cachet\u0026label=test)](https://github.com/cssnr/check-build-action/actions/workflows/test.yaml)\n[![Workflow Lint](https://img.shields.io/github/actions/workflow/status/cssnr/check-build-action/lint.yaml?logo=cachet\u0026label=lint)](https://github.com/cssnr/check-build-action/actions/workflows/lint.yaml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_check-build-action\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cssnr_check-build-action)\n[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/check-build-action?logo=github\u0026label=updated)](https://github.com/cssnr/check-build-action/pulse)\n[![Codeberg Last Commit](https://img.shields.io/gitea/last-commit/cssnr/check-build-action/master?gitea_url=https%3A%2F%2Fcodeberg.org%2F\u0026logo=codeberg\u0026logoColor=white\u0026label=updated)](https://codeberg.org/cssnr/check-build-action)\n[![GitHub Contributors](https://img.shields.io/github/contributors-anon/cssnr/check-build-action?logo=github)](https://github.com/cssnr/check-build-action/graphs/contributors)\n[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/check-build-action?logo=bookstack\u0026logoColor=white\u0026label=repo%20size)](https://github.com/cssnr/check-build-action?tab=readme-ov-file#readme)\n[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/check-build-action?logo=htmx)](https://github.com/cssnr/check-build-action)\n[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/check-build-action?logo=github)](https://github.com/cssnr/check-build-action/discussions)\n[![GitHub Forks](https://img.shields.io/github/forks/cssnr/check-build-action?style=flat\u0026logo=github)](https://github.com/cssnr/check-build-action/forks)\n[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/check-build-action?style=flat\u0026logo=github)](https://github.com/cssnr/check-build-action/stargazers)\n[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat\u0026logo=github\u0026label=org%20stars)](https://cssnr.github.io/)\n[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord\u0026logoColor=white\u0026label=discord\u0026color=7289da)](https://discord.gg/wXy6m2X8wY)\n[![Ko-fi](https://img.shields.io/badge/Ko--fi-72a5f2?logo=kofi\u0026label=support)](https://ko-fi.com/cssnr)\n\n# Check Build Action\n\n- [Features](#Features)\n- [Inputs](#Inputs)\n  - [Permissions](#Permissions)\n- [Outputs](#Outputs)\n- [Examples](#Examples)\n- [Tags](#Tags)\n- [Support](#Support)\n- [Contributing](#Contributing)\n\nAction to Check if the provided Build command was run and Optionally Comment on the PR.\n\nThis is useful for things like GitHub Actions which require a built distribution.\nIt will verify the build command has been run, and optionally comment on the PR with build instructions.\n\n```yaml\n- name: 'Check Build Action'\n  uses: cssnr/check-build-action@v1\n  with:\n    build: 'npm run build'\n    check: 'git diff --quiet dist'\n```\n\n_All [inputs](#inputs) are optional._\n\n## Features\n\n- Custom build command\n- Custom check command\n- Optional path to verify\n- Option to comment on PRs\n- Option to customize message and mention\n- Option to do [anything else you request](https://github.com/cssnr/check-build-action/discussions/categories/feature-requests)...\n\n## Inputs\n\n| Input               | Default\u0026nbsp;Value      | Description\u0026nbsp;of\u0026nbsp;Input\u0026nbsp;Value |\n| :------------------ | :---------------------- | :---------------------------------------- |\n| [install](#install) | `npm ci`                | Install Command to Run                    |\n| [build](#build)     | `npm run build`         | Build Command to Run                      |\n| [check](#check)     | `git diff --quiet dist` | Check Command to Run                      |\n| [path](#path)       | -                       | Path to Verify Exist                      |\n| [comment](#comment) | `true`                  | Add Comment to PR                         |\n| [message](#message) | _see below_             | Message for Comment                       |\n| [mention](#mention) | `true`                  | Mention Actor with @                      |\n| [summary](#summary) | `true`                  | Add Workflow Job Summary                  |\n| `token`             | `${{ github.token }}`   | Only for PAT Use [^1]                     |\n\n### install\n\nInstall command to run, optional. Set empty `install: \"\"` to disable.\n\n### build\n\nBuild or prepare command to run before checking if build was run.\n\n### check\n\nCheck command to run to verify build was run. This should exit with error on failure.\n\n### path\n\nA path to verify exists, otherwise will fail.\n\n### comment\n\nAdd a comment to the pull request.\n\n### message\n\nMessage to put in comment. Default:\n\n```shell\nRun: `run npm build`\n```\n\n### mention\n\nWill mention the actor in the comment with `@user`.\n\n### summary\n\nWill add result details to the job summary on the workflow run.\n\n\u003cdetails\u003e\u003csummary\u003e👀 View Example Job Summary\u003c/summary\u003e\n\n---\n\nComing Soon...\n\n---\n\n\u003c/details\u003e\n\n```yaml\n- name: 'Check Build Action'\n  uses: cssnr/check-build-action@v1\n```\n\n### Permissions\n\nThis action requires the following permissions to add pull request comments:\n\n```yaml\npermissions:\n  pull-requests: write\n```\n\nPermissions documentation for [Workflows](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token) and [Actions](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication).\n\n## Outputs\n\n| Output | Output\u0026nbsp;Description |\n| :----- | :---------------------- |\n| id     | Comment ID if Added     |\n| error  | Error Message if Any    |\n\nThis outputs the changes `json` object and the `markdown` table.\n\n```yaml\n- name: 'Check Build Action'\n  id: outdated\n  uses: cssnr/check-build-action@v1\n\n- name: 'Echo Output'\n  env:\n    ERROR: ${{ steps.outdated.outputs.error }}\n  run: |\n    echo \"id: ${{ steps.outdated.outputs.id }}\"\n    echo \"error: ${ERROR}\"\n```\n\nNote: due to the way `${{}}` expressions are evaluated, multi-line output gets executed in a run block.\n\nMore Output Examples Coming Soon...\n\n## Examples\n\n💡 _Click on an example heading to expand or collapse the example._\n\n\u003cdetails open\u003e\u003csummary\u003eCustom Build and Check Command\u003c/summary\u003e\n\n```yaml\n- name: 'Check Build Action'\n  uses: cssnr/check-build-action@v1\n  with:\n    build: 'npm run build'\n    check: 'git diff --quiet dist'\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003eWith All Inputs\u003c/summary\u003e\n\n```yaml\n- name: 'Check Build Action'\n  uses: cssnr/check-build-action@v1\n  with:\n    build: 'npm run build'\n    check: 'git diff --quiet dist'\n    path: ''\n    comment: 'true'\n    message: 'Run: `npm run build`'\n    mention: 'true'\n    summary: 'true'\n```\n\n\u003c/details\u003e\n\nFor a `pull_request_target` example, see: [check-build.yaml](https://github.com/cssnr/check-build-action/blob/master/.github/workflows/check-build.yaml)\n\nFor more examples, you can check out other projects using this action:  \nhttps://github.com/cssnr/check-build-action/network/dependents\n\nWant to automatically updated tags on release? Check out: [cssnr/update-version-tags-action](https://github.com/cssnr/update-version-tags-action)  \nWant to show package changes on release notes? Check out: [cssnr/package-changelog-action](https://github.com/cssnr/package-changelog-action)  \nWant to check outdated packages on a PR? Check out: [cssnr/npm-outdated-action](https://github.com/cssnr/npm-outdated-action)\n\n## Tags\n\nThe following rolling [tags](https://github.com/cssnr/check-build-action/tags) are maintained.\n\n| Version\u0026nbsp;Tag                                                                                                                                                                                                     | Rolling | Bugs | Feat. |   Name    |  Target  | Example  |\n| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :--: | :---: | :-------: | :------: | :------- |\n| [![GitHub Tag Major](https://img.shields.io/github/v/tag/cssnr/check-build-action?sort=semver\u0026filter=!v*.*\u0026style=for-the-badge\u0026label=%20\u0026color=44cc10)](https://github.com/cssnr/check-build-action/releases/latest) |   ✅    |  ✅  |  ✅   | **Major** | `vN.x.x` | `vN`     |\n| [![GitHub Tag Minor](https://img.shields.io/github/v/tag/cssnr/check-build-action?sort=semver\u0026filter=!v*.*.*\u0026style=for-the-badge\u0026label=%20\u0026color=blue)](https://github.com/cssnr/check-build-action/releases/latest) |   ✅    |  ✅  |  ❌   | **Minor** | `vN.N.x` | `vN.N`   |\n| [![GitHub Release](https://img.shields.io/github/v/release/cssnr/check-build-action?style=for-the-badge\u0026label=%20\u0026color=red)](https://github.com/cssnr/check-build-action/releases/latest)                           |   ❌    |  ❌  |  ❌   | **Micro** | `vN.N.N` | `vN.N.N` |\n\nYou can view the release notes for each version on the [releases](https://github.com/cssnr/check-build-action/releases) page.\n\nThe **Major** tag is recommended. It is the most up-to-date and always backwards compatible.\nBreaking changes would result in a **Major** version bump. At a minimum you should use a **Minor** tag.\n\n# Support\n\nFor general help or to request a feature, see:\n\n- Q\u0026A Discussion: https://github.com/cssnr/check-build-action/discussions/categories/q-a\n- Request a Feature: https://github.com/cssnr/check-build-action/discussions/categories/feature-requests\n\nIf you are experiencing an issue/bug or getting unexpected results, you can:\n\n- Report an Issue: https://github.com/cssnr/check-build-action/issues\n- Chat with us on Discord: https://discord.gg/wXy6m2X8wY\n- Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=Check%20Build%20Action)\n\nFor more information, see the CSSNR [SUPPORT.md](https://github.com/cssnr/.github/blob/master/.github/SUPPORT.md#support).\n\n# Contributing\n\nIf you would like to submit a PR, please review the [CONTRIBUTING.md](#contributing-ov-file).\n\nPlease consider making a donation to support the development of this project\nand [additional](https://cssnr.com/) open source projects.\n\n[![Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cssnr)\n\nAdditionally, you can support other GitHub Actions I have published:\n\n- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)\n- [Portainer Stack Deploy Action](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)\n- [Docker Context Action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)\n- [Actions Up Action](https://github.com/cssnr/actions-up-action?tab=readme-ov-file#readme)\n- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)\n- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)\n- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)\n- [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)\n- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)\n- [JSON Key Value Check Action](https://github.com/cssnr/json-key-value-check-action?tab=readme-ov-file#readme)\n- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)\n- [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)\n- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)\n- [Package Changelog Action](https://github.com/cssnr/package-changelog-action?tab=readme-ov-file#readme)\n- [NPM Outdated Check Action](https://github.com/cssnr/npm-outdated-action?tab=readme-ov-file#readme)\n- [Label Creator Action](https://github.com/cssnr/label-creator-action?tab=readme-ov-file#readme)\n- [Algolia Crawler Action](https://github.com/cssnr/algolia-crawler-action?tab=readme-ov-file#readme)\n- [Upload Release Action](https://github.com/cssnr/upload-release-action?tab=readme-ov-file#readme)\n- [Check Build Action](https://github.com/cssnr/check-build-action?tab=readme-ov-file#readme)\n- [Web Request Action](https://github.com/cssnr/web-request-action?tab=readme-ov-file#readme)\n- [Get Commit Action](https://github.com/cssnr/get-commit-action?tab=readme-ov-file#readme)\n\n\u003cdetails\u003e\u003csummary\u003e❔ Unpublished Actions\u003c/summary\u003e\n\nThese actions are not published on the Marketplace, but may be useful.\n\n- [cssnr/create-files-action](https://github.com/cssnr/create-files-action?tab=readme-ov-file#readme) - Create various files from templates.\n- [cssnr/draft-release-action](https://github.com/cssnr/draft-release-action?tab=readme-ov-file#readme) - Keep a draft release ready to publish.\n- [cssnr/env-json-action](https://github.com/cssnr/env-json-action?tab=readme-ov-file#readme) - Convert env file to json or vice versa.\n- [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action?tab=readme-ov-file#readme) - Sync files to a remote host with rsync.\n- [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action?tab=readme-ov-file#readme) - Update release notes.\n- [smashedr/combine-release-notes-action](https://github.com/smashedr/combine-release-notes-action?tab=readme-ov-file#readme) - Combine release notes.\n\n---\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e📝 Template Actions\u003c/summary\u003e\n\nThese are basic action templates that I use for creating new actions.\n\n- [js-test-action](https://github.com/smashedr/js-test-action?tab=readme-ov-file#readme) - JavaScript\n- [ts-test-action](https://github.com/smashedr/ts-test-action?tab=readme-ov-file#readme) - TypeScript\n- [py-test-action](https://github.com/smashedr/py-test-action?tab=readme-ov-file#readme) - Python (Dockerfile)\n- [docker-test-action](https://github.com/smashedr/docker-test-action?tab=readme-ov-file#readme) - Docker (Image)\n\nNote: The `docker-test-action` builds, runs and pushes images to [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).\n\n---\n\n\u003c/details\u003e\n\nFor a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)\n\n[^1]:\n    The `${{ github.token }}` / `{{ secrets.GITHUB_TOKEN }}` is automatically passed, there is no need to manually pass these!\n    This is only available to allow users to pass a different token they have created and defined in their `secrets`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssnr%2Fcheck-build-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssnr%2Fcheck-build-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssnr%2Fcheck-build-action/lists"}