From 2acb7286ff99436e45498e8506681c2c0e6e63d6 Mon Sep 17 00:00:00 2001 From: Yun Feng Date: Fri, 22 Jul 2022 17:31:12 +1000 Subject: [PATCH 1/2] fix: eslint action error in a PR from a fork repo error message: 'Resource not accessible by integration' --- .github/workflows/eslint.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 916763871a..8276d15ce7 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -24,13 +24,23 @@ jobs: run: yarn lint:report # Continue to the next step even if this fails continue-on-error: true + - name: Upload ESLint report + uses: actions/upload-artifact@v3 + with: + name: eslint_report.json + path: eslint_report.json + + Annotation: + if: github.repository == 'rrweb-io/rrweb' + needs: eslint_check_upload + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: eslint_report.json - name: Annotate Code Linting Results uses: ataylorme/eslint-annotate-action@v2 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' report-json: 'eslint_report.json' - - name: Upload ESLint report - uses: actions/upload-artifact@v2 - with: - name: eslint_report.json - path: eslint_report.json From a1328dd74e5b11b1405e4a904bb53b43dbaa5251 Mon Sep 17 00:00:00 2001 From: Yun Feng Date: Fri, 22 Jul 2022 21:00:41 +1000 Subject: [PATCH 2/2] try to fix the github action error --- .github/workflows/eslint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 8276d15ce7..a9f7736953 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -31,7 +31,8 @@ jobs: path: eslint_report.json Annotation: - if: github.repository == 'rrweb-io/rrweb' + # Skip the annotation action in PRs from the forked repositories + if: github.event.pull_request.head.repo.full_name == 'rrweb-io/rrweb' needs: eslint_check_upload runs-on: ubuntu-latest steps: