From 09ea107b3ee3dd0634d1fd1680ada95d23535924 Mon Sep 17 00:00:00 2001 From: Linying Assad Date: Tue, 4 Aug 2026 16:31:16 +0800 Subject: [PATCH] fix: run license check safely for fork PRs --- .github/workflows/license-eyes.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/license-eyes.yml b/.github/workflows/license-eyes.yml index 320a24e3..1cb74ab6 100644 --- a/.github/workflows/license-eyes.yml +++ b/.github/workflows/license-eyes.yml @@ -17,22 +17,16 @@ # --- name: License Check -on: [push, pull_request_target] +on: [push, pull_request] jobs: license-check: name: "License Check" runs-on: ubuntu-latest steps: - - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" - if: ${{ github.event_name != 'pull_request_target' }} - uses: actions/checkout@v3 - - name: Checkout ${{ github.ref }} ( ${{ github.event.pull_request.head.sha }} ) - if: ${{ github.event_name == 'pull_request_target' }} - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} + - name: Checkout + uses: actions/checkout@v4 - name: Check License uses: apache/skywalking-eyes@v0.2.0 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}