Skip to content

Commit

Permalink
Workaround to run auto format on forks (if github actions is enabled)
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Aug 21, 2023
1 parent 06f36f2 commit 6cad4fa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -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/prettier_action@v4.3
with:
Expand Down

0 comments on commit 6cad4fa

Please sign in to comment.