Tweak action triggers
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
name: Build with gradle
|
name: Build with gradle
|
||||||
run-name: Building for ${{ gitea.actor }}
|
run-name: Building for ${{ gitea.actor }}
|
||||||
on: [pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build-with-gradle:
|
Build-with-gradle:
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
name: Java Google Checkstyle
|
name: Java Google Checkstyle
|
||||||
|
run-name: Linting for ${{ gitea.actor }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-request: write
|
pull-request: write
|
||||||
|
|
||||||
on: [pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checkstyle:
|
checkstyle:
|
||||||
@@ -22,13 +27,6 @@ jobs:
|
|||||||
java-version: '22'
|
java-version: '22'
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: 'Find changed Java files'
|
|
||||||
id: changed-files
|
|
||||||
uses: tj-actions/changed-files@v44
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
**.java
|
|
||||||
|
|
||||||
- name: 'Setup Reviewdog'
|
- name: 'Setup Reviewdog'
|
||||||
uses: reviewdog/action-setup@v1
|
uses: reviewdog/action-setup@v1
|
||||||
with:
|
with:
|
||||||
@@ -37,6 +35,13 @@ jobs:
|
|||||||
- name: 'Pull code'
|
- name: 'Pull code'
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: 'Find changed Java files'
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v44
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
**.java
|
||||||
|
|
||||||
- name: 'Run Checkstyle with Reviewdog'
|
- name: 'Run Checkstyle with Reviewdog'
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user