mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-25 14:34:54 +00:00
Update build-and-test.yml
This commit is contained in:
1 parent
e0b34e8b9a
commit
41a6cc0711
1 file changed
+21
-11
@@ -1,13 +1,23 @@
|
||||
|
||||
name: Build and test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
name: Fix Spotless Formatting
|
||||
on:
|
||||
workflow_dispatch: # 允许手动触发
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
|
||||
secrets: inherit
|
||||
spotless-fix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '8'
|
||||
- name: Run spotlessApply
|
||||
run: ./gradlew spotlessApply
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config --global user.name 'GitHub Action'
|
||||
git config --global user.email '[email protected]'
|
||||
git add -A
|
||||
git commit -m 'Apply spotless formatting' || exit 0
|
||||
git push
|
||||
Reference in new issue
Block a user