Skip to content

Commit

Permalink
Checkout PR's code when event is pull request target
Browse files Browse the repository at this point in the history
  • Loading branch information
KasukabeDefenceForce committed Aug 21, 2024
1 parent dd7fd19 commit ae56b4d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: codespell
on:
push:
branches:
- "*"
- master

pull_request_target:
branches:
Expand All @@ -15,16 +15,24 @@ jobs:

steps:
- uses: actions/checkout@v4
if: github.event_name != 'pull_request_target'

- name: Checkout pull/${{ github.event.number }}
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
if: github.event_name == 'pull_request_target'

- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: codespell-env
environment-name: fetch-env
create-args: >-
python
- name: Install Codespell
run: pip install codespell
run: pip install codespell==1.10.0

- name: Run codespell
run: |
Expand Down

0 comments on commit ae56b4d

Please sign in to comment.