Ver código fonte

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

Riccardo Balbo 2 anos atrás
pai
commit
6cad4fa5a1
1 arquivos alterados com 4 adições e 6 exclusões
  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: