Skip to content

Commit

Permalink
Add docker creator and format action
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiser-Yang committed Jul 15, 2024
1 parent 285c25b commit 34f42ce
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/java-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Google Java Style Format

on:
pull_request:
branches: [ master, develop ]

jobs:
java-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}

- name: Google Java Style Format
uses: axel-op/googlejavaformat-action@v3
with:
# --aosp: 4-space indentation
args: "--replace --aosp"
# Can not auto commit, we'll commit manually
skip-commit: true

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Apply Google Java Style Format"
token: ${{ secrets.PAT }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# root directory for the file explorer
.root/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "3rdparty/docker-script"]
path = 3rdparty/docker-script
url = https://github.com/CMIPT/docker-script.git
1 change: 1 addition & 0 deletions 3rdparty/docker-script
Submodule docker-script added at 934e23
11 changes: 11 additions & 0 deletions src/StyleTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// You should remove this file once the test have been passed


public class StyleTest {
public static void main(String[] args) {
if (true)
System.out.println("Hello, google java style format!");

System.out.println("Hello, google java style format!");
}
}

0 comments on commit 34f42ce

Please sign in to comment.