-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connect my checkstyle9.pl script to a action.
Sponsored by: Netflix
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
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
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,37 @@ | ||
name: Style Checker | ||
|
||
on: | ||
push: | ||
branches: [ main, 'stable/13', 'stable/14' ] | ||
pull_request: # maybe pull_request_target | ||
branches: [ main ] | ||
# types: [ opened, reopened, edited ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Style Checker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 100 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Sanity | ||
run: | | ||
git log --oneline -100 | ||
ls .git/refs/heads | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- name: Install packages | ||
run: | | ||
sudo apt-get update --quiet || true | ||
sudo apt-get -yq --no-install-suggests --no-install-recommends install perl | ||
- name: Run checker | ||
run: | | ||
tools/build/checkstyle9.pl ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} |