Skip to content

Commit

Permalink
Connect my checkstyle9.pl script to a action.
Browse files Browse the repository at this point in the history
Sponsored by:		Netflix
  • Loading branch information
bsdimp committed Jan 6, 2024
1 parent 6f55a4e commit 85a59ac
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/cross-bootstrap-tools.yml
Expand Up @@ -2,7 +2,7 @@ name: Cross-build Kernel

on:
push:
branches: [ main, 'stable/13' ]
branches: [ main, 'stable/13', 'stable/14' ]
pull_request:
branches: [ main ]

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/style.yml
@@ -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 }}

0 comments on commit 85a59ac

Please sign in to comment.