From fa38a951b045d0830560d96a8943f09cbe6af58b Mon Sep 17 00:00:00 2001 From: EttyKitty <20323032+EttyKitty@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:11:24 +0300 Subject: [PATCH] ci: Gobo checking workflow --- .github/workflows/gobo_check.yml | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/gobo_check.yml diff --git a/.github/workflows/gobo_check.yml b/.github/workflows/gobo_check.yml new file mode 100644 index 000000000..590250908 --- /dev/null +++ b/.github/workflows/gobo_check.yml @@ -0,0 +1,43 @@ +name: Format Code + +on: + pull_request: + types: [opened, edited, ready_for_review, synchronize] + paths: + - '**.gml' + +jobs: + format-check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + files: '**.gml' + + - name: Setup Gobo + if: steps.changed-files.outputs.any_changed == 'true' + run: | + curl -LO https://github.com/EttyKitty/Gobo/releases/download/v1.0.0/gobo-ubuntu.zip + unzip gobo-ubuntu.zip + chmod +x ./gobo + + - name: Run Formatter + if: steps.changed-files.outputs.any_changed == 'true' + run: | + # Pass all changed files to gobo at once + ./gobo ${{ steps.changed-files.outputs.all_changed_files }} + + - name: Verify Formatting + run: | + if ! git diff --quiet; then + echo "::error::Files not formatted. Please run Gobo locally." + git diff --name-only + exit 1 + fi \ No newline at end of file