generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate PR changes to make sure there are no changes missing (#165)
* Create pr-check.yml * Use correct npm commands * Adress issues from linting * CI step to fill the node_modules needed for the compile * Fix check * Add message when things are good
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# check incoming pr's and make sure that | ||
# - the code builds | ||
# - the dist folder does not need updating | ||
name: PR Check | ||
|
||
on: | ||
push: | ||
|
||
pull_request: | ||
|
||
jobs: | ||
build-and-check-dist: | ||
name: Run build and check dist folder | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Compile with NPM | ||
run: | | ||
npm ci | ||
npm run compile | ||
npm run package | ||
- name: Check if there are changes that where not in the commit | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Found changes to commit after building. Here is the output from `git status`:" | ||
git status | ||
exit 1 | ||
else | ||
echo "No changes found after compiling. PR is good for a review." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters