Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/gobo_check.yml
Original file line number Diff line number Diff line change
@@ -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