lots0logs / gh-action-get-changed-files

GitHub Action that saves changed files as JSON for use by other actions.
MIT License
86 stars 38 forks source link

Added support for pull_request_target event type #22

Closed raik0707 closed 1 year ago

raik0707 commented 2 years ago

What do I want to achieve?

I want to use this action for pull requests from forks with using secrets. So I added this other event type which will work because it has the exact same payload. https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target

patrick91 commented 2 years ago

I've just tested this and it works, if anyone wants to try, you can do to:

jobs:
  ok-to-preview:
    if: ${{ github.event.label.name == 'ok-to-preview' }}
    runs-on: ubuntu-latest
    steps:

    - name: Get changed files
      #uses: lots0logs/gh-action-get-changed-files@2.1.4
      uses: Mineflash07/gh-action-get-changed-files@feature/support-pr-target-event # Remove as soon as PR is merged
      with:
        token: ${{ secrets.GITHUB_TOKEN }}