This action is designed to check if a build has been run. It works on any event.
On a pull_request it will add a comment with a message mentioning the user.
All options are configurable.
Input | Req. | Default Value | Input Description |
---|---|---|---|
build | - | npm run build |
Build Command to Run * |
check | - | git diff --quiet dist |
Check Command to Run * |
path | - | - | Path to Verify Exist * |
comment | - | true |
Add Comment to PR * |
message | - | see below | Message for Comment * |
mention | - | true |
Mention Actor with @ * |
summary | - | true |
Add Workflow Job Summary * |
token | - | github.token |
For use with a PAT |
build: Build or prepare command to run before checking if build was run.
check: Check command to run to verify build was run. This should exit with error on failure.
path: A path to verify exists, otherwise will fail.
comment: Add a comment to the pull request.
message: Message to put in comment. Default:
Run: `run npm build`
mention: Will mention the actor in the comment with @user
.
summary: Will add result details to the job summary on the workflow run.
π View Example Job Summary
Coming Soon...
- name: 'Check Build Action'
uses: cssnr/check-build-action@master
This action requires the following permissions to add pull request comments:
permissions:
pull-requests: write
Permissions documentation for Workflows and Actions.
Output | Output Description |
---|---|
id | Comment ID if Added |
error | Error Message if Any |
This outputs the changes json
object and the markdown
table.
- name: 'Check Build Action'
id: outdated
uses: cssnr/check-build-action@master
- name: 'Echo Output'
env:
ERROR: ${{ steps.outdated.outputs.error }}
run: |
echo "id: ${{ steps.outdated.outputs.id }}"
echo "error: ${ERROR}"
Note: due to the way ${{}}
expressions are evaluated, multi-line output gets executed in a run block.
More Output Examples Coming Soon...
π‘ Click on an example heading to expand or collapse the example.
Custom Build and Check Command
- name: 'Check Build Action'
uses: cssnr/check-build-action@master
with:
build: 'npm run build'
check: 'git diff --quiet dist'
With All Inputs
- name: 'Check Build Action'
uses: cssnr/check-build-action@master
with:
build: 'npm run build'
check: 'git diff --quiet dist'
path: ''
comment: 'true'
message: 'Run: `npm run build`'
mention: 'true'
summary: 'true'
More Examples Coming Soon...
The following rolling tags are maintained.
Version Tag | Rolling | Bugs | Feat. | Name | Target | Example |
---|---|---|---|---|---|---|
β | β | β | Major | vN.x.x |
vN |
|
β | β | β | Minor | vN.N.x |
vN.N |
|
β | β | β | Micro | vN.N.N |
vN.N.N |
You can view the release notes for each version on the releases page.
The Major tag is recommended. It is the most up-to-date and always backwards compatible. Breaking changes would result in a Major version bump. At a minimum you should use a Minor tag.
- Custom build command
- Custom check command
- Optional path to verify
- Option to comment on PRs
- Option to customize message and mention
- Wait for some feature requests...
Want to automatically updated tags on release? Check out: cssnr/update-version-tags-action
Want to check outdated packages on a PR? Check out: cssnr/npm-outdated-action
Want to show package changes on release notes? Check out: cssnr/package-changelog-action
For general help or to request a feature, see:
- Q&A Discussion: https://github.com/cssnr/check-build-action/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/check-build-action/discussions/categories/feature-requests
If you are experiencing an issue/bug or getting unexpected results, you can:
- Report an Issue: https://github.com/cssnr/check-build-action/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: https://cssnr.github.io/feedback/
For more information, see the CSSNR SUPPORT.md.
Currently, the best way to contribute to this project is to star this project on GitHub.
For more information, see the CSSNR CONTRIBUTING.md.
Additionally, you can support other GitHub Actions I have published:
- Stack Deploy Action
- Portainer Stack Deploy
- VirusTotal Action
- Mirror Repository Action
- Update Version Tags Action
- Update JSON Value Action
- Parse Issue Form Action
- Cloudflare Purge Cache Action
- Mozilla Addon Update Action
- Docker Tags Action
- Package Changelog Action
- NPM Outdated Check Action
For a full list of current projects to support visit: https://cssnr.github.io/