Procházet zdrojové kódy

Workaround to run auto format on forks (if github actions is enabled)

Riccardo Balbo před 2 roky
rodič
revize
6cad4fa5a1
1 změnil soubory, kde provedl 4 přidání a 6 odebrání
  1. 4 6
      .github/workflows/format.yml

+ 4 - 6
.github/workflows/format.yml

@@ -1,18 +1,16 @@
 name: auto-format
 on:
-  pull_request:
+  push:
 
 jobs:
-  prettier:
+  format:
     runs-on: ubuntu-latest
+    if: github.repository != 'jMonkeyEngine/jmonkeyengine'
     steps:
       - name: Checkout
         uses: actions/checkout@v3
         with:
-          # Make sure the actual branch is checked out when running on pull requests
-          ref: ${{ github.head_ref }}
-          # This is important to fetch the changes to the previous commit
-          fetch-depth: 0
+          fetch-depth: 0   
       - name: Prettify code
         uses: creyD/[email protected]
         with: