Skip to content

Commit

Permalink
Improve Non-Fork Handling
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Schmiedmayer <[email protected]>
  • Loading branch information
PSchmiedmayer authored May 29, 2024
1 parent 29054a7 commit 6e43005
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,15 @@ jobs:
- name: Check if PR is from a fork
id: fork-check
run: |
if [[ ${{ github.event_name }} == 'pull_request' && ${{ github.event.pull_request.head.repo.fork }} == 'true' ]]; then
if [[ "${{ github.event_name }}" == 'pull_request' && "${{ github.event.pull_request.head.repo.fork }}" == 'true' ]]; then
echo "is_fork=true" >> $GITHUB_ENV
else
echo "is_fork=false" >> $GITHUB_ENV
fi
- name: Run ESLint if PR is from a fork
if: ${{ env.is_fork == 'true' }}
if: env.is_fork == 'true'
run: npm run lint:ci
- name: Annotate Code Linting Results
if: ${{ env.is_fork == 'false' }}
if: env.is_fork == 'false'
uses: ataylorme/eslint-annotate-action@v3
with:
only-pr-files: false
Expand Down

0 comments on commit 6e43005

Please sign in to comment.